iruff
Posts: 5
Joined: Tue Jul 17, 2007 1:32 pm

conditional module installation

I have created a module and added to my project, placing it in its own feature. I have provided a checkbox for the user to select whether or not to install this piece. On the checkbox properties, I have the following that I believe will be of interest:
  • Value: 1
    Default Value: [empty]
    Property Name: INSTALL_MODULE (which as I understand is a public value b/c of all caps)
    Integer: True
On the Organization page, I select the feature which holds my module, and I have left the Install Level at 1, but have placed a Conditional
  • Condition: NOT INSTALL_MODULE
    Level: 0
The problem is that I cannot get my module to install with the Feature installation Condition in place, but if I remove it, it installs no problem. I do not get an error, and the logs show that "INSTALL_MODULE = 1". What am I doing wrong? Is the SetupTypeDlg required for the installer to pay attention to the Install Levels?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

The install level of a feature cannot be changed from the UI because it is executed to late. The InstallLevel property is set under "CostFinalize" standard action which is executed before the property of the checkbox is changed.

However, this can be done by using a custom action. There is a similar discussion on the forum, please take a look:
http://www.advancedinstaller.com/forums ... al+feature

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”