Close Installer finishing the last component successfully?

May 8, 2009 at 3:52 PM
Edited May 13, 2009 at 11:20 PM


is there way that the installer gets closed (with successfull install message shown) after the last component has finished sucessfully?
The problem I have is that there are four components in my setup. Components one and two have installed-check conditions and the installer determines if they need to be installed or not. The third component is not required - the user can choose to install it or to don't install it. The last component should be installed reafardless of what there one the system is - so it has no installed-check condition.

Now I wonder if there is way to close the installer after at least the last component (the fourth, that gets installed every time) has been installed.

Edit: As a temporary workaround I made a installed check (file) which tests for the decrompressed files relevant for the component in consideration. So if I want DNI to to close after all components have been executed I check if for example an MSI file exists. If it does (and it does after the component was executed) it is treated as installed. Is is not something went wrong. I just wonder what will happen if an error occurs in the component - will DNI still think everything is fine because of the installed file check?

Thanks in advance,

May 15, 2009 at 1:56 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 15, 2009 at 1:59 PM

Looks like there's a design flaw with the new optional components. I added a bug. I think I need to change the auto_close_if_installed option into an enumeration.

  • All: auto-close if all components is installed.
  • Required: auto-close if required components are installed.
  • anything else?


May 15, 2009 at 2:16 PM

Hi dB.,

thank your for the answer and ideas. I think it would be the a good idea to change the auto_close_if_installed option into an enumeration and both suggestions are pretty good.
A thing that is a problem of mine is that I want to have the possibility to install my main component whenever I start the bootstrapper. This leads me to have having no install check with the main component, but still, it is required. So this means that the auto_close option could offer one item more: Required succeeded: After all required components succeeded and returned without an error. could be seen as a prallel to the install check versions.


May 15, 2009 at 2:45 PM

By required I meant exactly required succeeded. By all I meant all succeeded (as in required + optional). As a side note, I don't see why anyone would want the bootstrapper to auto-close on error, but for completeness I could add error.

Is what you want really an auto-start with the first component that's not intsalled? I mean, is there any other logic than just hitting the install button? Personally I think it's weird in an interactive scenario, but help me understand your workflow.


May 15, 2009 at 2:56 PM


ok, so I misunderstood you. I am glad that we mean the same with Required and Requited succeeded etc.
Some weeks ago I though I would need such an auto start feature like you described. Meanwhile I, too, think that this could be feel weird and is not very intuitive. So, no - I do not want this auto-start feature which starts the first component that is not installed.

Jul 6, 2009 at 11:13 AM

Hi dB, I am glad that there is currently some more progress in the project :) - have you had some time to look at this issue? (it currently seems not be resolved). If you do not find the time for it, could you give a hint where you started some efforts on it in the sources (if you did something on this already)? Maybe I can have look at it to make it work (at least for me?).


Jul 6, 2009 at 12:34 PM

I tried to code this once, but got myself very confused with the code logic. I think I'll get back to it this month.

If you want to try to make a code change, I started by changing the editor's auto_close option from a boolean to an enum of how I want it to behave, then propagate through the rest of the code.

Jul 15, 2009 at 9:33 PM

I think I fixed this in build 1.7.26029.0. I went a simpler route. I nam now convinced that this is simply a bug.

  1. Obviously you have to set auto_close_if_installed = true. This means that if all component installations that just ran finished successfully, the bootstrapper should close, regardless of whether you still have (optional or required) components left to install.
  2. If all components, optional and required, have been installed, there's no need for an empty UI to hang in front of the user, so that closes even if auto_close_if_installed = false.
  3. If the bootstrapper is rerun, the only time it should not present the UI is when all components are installed. If there're any components to be installed, optional or required, then it should not auto-close until the user hits install and goes through (1).

Please try the build, let me know if this works for you.


Jul 16, 2009 at 8:35 PM


thank you very much for this commit :)
It works exactly like you wrote. At first I thought the same bug as before was in there. Then I realized that a component failed to install. I think it is a good and expected behaviour for the bootstrapper to stay open.

Some days ago I thought that I would find some time to look into the code, but sadly did not. A more or less general question: If I make some code changes, do you want me to post them or send them to you? I have not much experience in open source development and I am curious how this should ideally work :)

Ad a side note: Now that this feature works I plan to use your bootstrapper in a shipping product :)


Jul 16, 2009 at 10:14 PM

Open source is all about total transparency. You should post patches here and make everything very visible and public. For the future, I'm a harsh reviewer, so don't take rejection too personally :)