Programmatically set Feature to not install? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

ash_microsec
Posts: 38
Joined: Thu Dec 16, 2010 9:35 am
Location: Emsworth

Programmatically set Feature to not install?

My installation package has a "BACKUPFILE" property for a backup file path/name that may exist in the installer packages folder, and a script mechanism for setting a "BACKUPFILE_EXISTS" parameter, and this works. When the "Custom" setup route is used, the user has to choose a valid file if the default file does not exist, otherwise they cannot get to the Verify Dialog's "Install" button. However, if the user chooses the "Typical" setup route, the file specified by the default file value may not exist, and the user can still get to the Verify Dialog's "Install" button.

I would like to programmatically mark a feature as "do not install " if the file is not found. My thought is whether it is possible to add an event to the VerifyReadyDlg's Install button's Published Events to do this, so that the InstallValidate action shows:

Code: Select all

Feature: DataBackup; Installed: Absent; Request: Null; Action: Null
Instead of what is seen when you select the feature for installation:

Code: Select all

Feature: DataBackup; Installed: Absent; Request: Local; Action: Local
Maybe a "SetProperty" event that sets the feature "&DataBackup" (is this correct?) to "?" (dont know what) if the "BACKUPFILE_EXISTS = 0" condition is true? Is this possible, and if so, what should the event parameters be?
ash_microsec
Posts: 38
Joined: Thu Dec 16, 2010 9:35 am
Location: Emsworth

Re: Programmatically set Feature to not install?

I've just seen a reference to setting a conditional feature (http://www.advancedinstaller.com/user-g ... ature.html), which I think is relevant. I'll give it a try.
ash_microsec
Posts: 38
Joined: Thu Dec 16, 2010 9:35 am
Location: Emsworth

Re: Programmatically set Feature to not install?

The conditional feature VBScript solution worked.

Return to “Common Problems”