cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SpiderLily1
Level 6

Problems with Features in InstallScript project

Jump to solution

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?

Labels (1)
0 Kudos
(1) Solution

Setting DataFiles\\RequiredData as a Required feature for the ProgramFiles and PropertiesFiles features did work.

View solution in original post

0 Kudos
(2) Replies
SpiderLily1
Level 6

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."

 

0 Kudos

Setting DataFiles\\RequiredData as a Required feature for the ProgramFiles and PropertiesFiles features did work.

0 Kudos