I created an installer with two components, I call it "base" and "Component A". Component A is to unzip an external zip file (call it a.zip). I set Component A invisible/unselected if the zip is not present in the installer_directory. I turned on allowAddRemoveComponents. I did the following install/uninstall:

  1. Install base without a.zip.
  2. Add a.zip to installer_directory, run installer again into the same directory, component A is visible this time, install "component A"
  3. Run uninstaller, select Uninstall individual components, I notice "component A" is not there. If I choose uninstall all, component A is uninstalled, but just I won't be able to uninstall "A" alone.
  4. If I install base and "A" at the same time, when I uninstall, I do have the choose just to uninstall "A"

Is there anything I can do with the installer or this is a bug with InstallBuilder?

To be clear this problem only happens when the first time, a.zip is not present, component A is set to invisible (show=0), second time, a.zip is present, but adding component A at the second time doesn't seem to change the visibility of component A in the uninstaller.


asked 27 May '12, 03:43

gt8967884's gravatar image

accept rate: 12%

I was not able to reproduce the issue. Instead of checking if file exists, I have simply implemented a page to reproduce:

  <description>Allow test component?</description>

Please note that as it is shown before installdir, it is also shown before component selection screen.

I first installed it with allowtest set to 0, did not see or select the test component. Next I installed it with allowtest set to 1, manually selected the test component and the uninstaller showed test component properly.

Can you try to make a minimal project that reproduces the issue and can be built by us without all the files your installer has? Please send it to support@bitrock.com so we can try to reproduce the issue.

Also, you can try to add setting it as always visible in <postInstallationActionList>:


This could also resolve the issue.

The reason is that if latest run of the installer sets show/canBeEdited to 0, then running the uninstaller causes the component not to be shown. Which in most cases is desired - i.e. to disallow uninstalling a mandatory component, however, in this case has to be set manually after the installation.

Setting this to 1 does not break anything as when it is not installed, it will not be shown in uninstaller, also, the next installer will have those values set based on actions/rules run before component selection page - in my example the <setInstallerVariable> in <postShowPageActionList>, in your probably it is set in <preInstalllationActionList> or <initializationActionList> based on <fileTest> or similar rule.


answered 29 May '12, 10:23

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Did your 2nd installation install to the same directory (like adding a component to an existing installation)? I tested your code, saw the same behavior as I saw earlier. The workaround doesn't work for me either.

(29 May '12, 17:56) gt8967884

Yes, my second installation was done to same directory. I am not sure why I would not be able to reproduce the issue. Are you sure that you only added the booleanParameter to an empty project, enabled component selection and add/remove components feature? What version are you using? What platform was this tested on?

As for similar issue, I did reproduce something similar by doing:

  1. Install with allowtest=1 and install both components
  2. Install with allowtest=0 and without modifying components
  3. Then uninstaller does not show test component in the list, since it has show=0 from step 2
(30 May '12, 08:40) wojciechka ♦♦

Regarding the reproduction by setting allowtest=0 in step 2, what can be done is set project.component(test).show and project.component(test).canBeEdited in <postinstallationactionlist> which works fine. My previous answer did not since <preuninstallationactionlist> is run after component selection, I have updated my answer above.

(30 May '12, 08:48) wojciechka ♦♦

I actually had my own logic that if detecting installing to the same directory change the InstallType to upgrade, that caused the second install didn't update the visibility of the components, so I guess I shouldn't do so.

Your workaround works in general, but if "test" is a child component of another one, say "top", by doing your workaround, the "top" will show during uninstall after the 1st installation even it is not showing in the 1st installation.

Anyway, thanks very much for your help.

(30 May '12, 22:05) gt8967884
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 27 May '12, 03:43

Seen: 1,213 times

Last updated: 30 May '12, 22:05