Hello again.

I have the need to include/exclude certain features from the setup depending on the Release. For example, I have a "No Docs" release that should not include any of the documentation features. When compiling for this "No Docs" release, it's important that:
1) The files for that feature are not compiled into the Setup, because of their large size.
2) The feature is not listed at all on the Custom setup dialog.

I thought I had accomplished this by using the #ifcompvar directive in a few clever places. This first section prevented the feature from showing up in the Custom setup dialog:

Code:
#ifcompvar [SB_RELEASEID] Not Equals "No Docs" Then
::Define Feature "Documentation" (Documentation)
#end
And this second section prevented the feature from being compiled into the Setup.exe:

Code:
#ifcompvar [SB_RELEASEID] Not Equals "No Docs" Then
Install File "E:\Users Guide.pdf" to "%_SB_INSTALLDIR%\Docs\Users Guide.pdf"  (Documentation)
#end
Everything looks good in the Setup; when compiled for the "No Docs" Release, the overall size of the Setup.exe is smaller by the size of the PDF, the Setup.htm does not list the "Users Guide.pdf" as a file, and the "Documentation" feature does not display on the Custom setup dialog.

Everything does work as it should if the Custom setup dialog is displayed. If a Complete install is chosen, and the Custom setup dialog is never displayed, then things get strange. The Documentation feature is not installed, but there are other features (somewhat randomly) that should be installed but are not.

In debugging through the code, it appears that the _SB_FEATURESID variable is not getting set properly unless the Custom setup dialog is displayed. I'm not changing any of the selections in that dialog, I'm leaving all the defaults, but it significantly impacts the _SB_FEATURESID variable.

If the Custom setup dialog is not displayed, this is the value of _SB_FEATURESID:
|_0000_|_0001_|_0001_0001_|_0001_0001_0001_|_0001_ 0001_0002_|_0001_0002_|_0001_0002_0001_|_0001_0002 _0002_|_0001_0003_|_0001_0003_0001_|_0001_0003_000 2_|_0001_0004_|_0001_0004_0001_|_0001_0004_0002_|_ 0001_0005_|_0001_0005_0001_|_0001_0005_0002_|_0001 _0005_0003_|_000|

If the Custom setup dialog is displayed, but nothing is changed, this is the value of _SB_FEATURESID:
|_0000_|_0001_|_0001_0002_|_0001_0002_0001_|_0001_ 0002_0002_|_0001_0005_|_0001_0005_0001_|_0001_0005 _0002_|_0001_0005_0003_|_0001_0005_0004_|_0001_000 5_0005_|_0001_0006_|_0001_0008_|_0001_0009_|_0001_ 0010_|_0002_|_0002_0001_|_0002_0002_|

I would work around the issue by forcing the user to go through the Custom setup dialog in all cases, but that isn't an option for a silent install.

Please help! Thanks,

Joshua