- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Problems with Features in InstallScript project
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I have a problem with features and subfeatures in my installscript project. Given the following features, they will be installed in the 3 different directories, in parentheses.
> ProgramFiles (TARGETDIR)
> PropertiesFiles (PROPS_DIR)
> DataFiles (DATA_DIR)
> RequiredData
> OptionalData
> OptionalData1
> OptionalData
My problem regards dependencies, visibility, and user selection options. I can make ProgramFiles and PropertiesFiles invisible to the user, which is perfect, because those entire features are required. I would like RequiredData to be invisible, but still be installed, regardless. However, if I make DataFiles invisible, the SdFeatureTree shows a blank box, so the user can't choose any OptionalData. If I make DataFiles visible, the checkbox control is enabled, which means the user may uncheck DataFiles entirely, thinking that they are just refusing OptionalData, and as a result, RequiredData is not installed.
What complicates matters is that the 3 main features are installed in 3 directories. All selected DataFiles must be installed in DATA_DIR. So I already have to use TextSubSetValue, FeatureSetTarget, and TextSubGetValue to save the <PROPS_DIR> and <DATA_DIR> values to the log, so that they can be found on uninstall.
If I separate the OptionalData from the DataFiles, and make it its own top-level feature, it may solve the problem with selecting required/optional features, but will I need to add an additional property variable for it, and additional calls to TextSubSetValue, FeatureSetTarget, and TextSubGetValue, all thoughout the script, even though it should be exactly the same value as <DATA_DIR>?
The components themselves that are included in OptionalData are defined with Destination values specifying <DATA_DIR>, such as <DATA_DIR>\OptionalData1, etc., but I guess I would have to change that too.
Is this really that complicated? Can't we set a parent feature checkbox to "disabled," but allow it to still be visible, so that its invisible "critical" children will still be installed, while its visible optional children can be selected/deselected?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Setting DataFiles\\RequiredData as a Required feature for the ProgramFiles and PropertiesFiles features did work.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I am checking to see if setting DataFiles\\RequiredData as a Required feature for the ProgramFiles and PropertiesFiles features will work. I have doubts that it will work, because the site https://helpnet.flexerasoftware.com/installshield21helplib/helplibrary/FeatureSettings.htm? states:
"Project: In InstallScript MSI projects, this setting is applicable to root-level features during a first-time installation. It is also applicable to subfeatures in an upgrade or patch. This setting is ignored for subfeatures during a first-time installation."
- Tags:
- installscript
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Setting DataFiles\\RequiredData as a Required feature for the ProgramFiles and PropertiesFiles features did work.
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)