sachaguyer
Posts: 1
Joined: Fri Nov 17, 2017 4:10 pm

Setting a registry value based on a feature installation state

Fri Nov 17, 2017 4:19 pm

I have an installer with a main and an optional feature.

I would like to set some registry value based on the optional feature, i.e. set the registry value to "True" when the optional feature is installed,
and to "False" when the optional feature is not installed.

I have read https://www.advancedinstaller.com/user- ... ition.html, but this is not exactly what I want.

Is this possible using a "Registry Entry", or do I need to add a custom action?

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Setting a registry value based on a feature installation state

Mon Nov 20, 2017 12:36 pm

Hi and welcome to our forums.

In order to write a "True" or "False" value in your registry entry based on a feature you can follow the steps below:
- go to the Install Parameters page, right-click in the “Properties” field and choose “New Property” from the context menu to create a new property. Let's name it STATE_PROP and assign it the value "False"
- go to the Registry page and create your registry with the type string
- write the property you have just created as in it's "Data" field (e.g. [STATE_PROP])
- the next step is to go to the Dialog Page and on the VerifyReadyDlg --> Next button add a "Set installer's property" published event configured as below:
  • Property: STATE_PROP
    Argument: True
    Condition:
    For the condition click on the picker ([...]) and chose "Feature will be installed local. The feature is not reinstalled" then select your optional feature
This will work since the state of the optional feature (Installed/Not Installed) is set before the VerifyReadyDlg.

Let me know if you have other questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”