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!

Sergej_Molotov
Posts: 1
Joined: Fri May 16, 2008 8:18 am

Different value for a registry-entry

Hello,

in my Installer-Project I have a MainFeature and two SubFeature. Only one of the Subfeatures can be selected. The Subfeature should change a Registry-Value which is defined in the MainFeature.

Unfortunately I have no possibility to add Registry-Values with the same entry-name and different value in Subfeature1 and Subfeature2

So I decided to create a custom-action (visual basic script) for each Subfeature. It should be executed, if one of the Subfeatures will be install.

Now my Question:
How can I change a registry-value in a custom action or is there any other possibility to change a this value by clicking in the Advanced-Installer GUI?

Thanks for your support
Thomas
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Different value for a registry-entry

Hi Thomas,

The tree control in the Registry page does not support duplicate entries, but the "Registry" table inside the MSI supports them. Therefore, a solution is to create a key which uses a property in its name.

Here are the steps for the "HKEY_LOCAL_MACHINE\Software\MyKey" registry key (you can adapt the example to your custom registry keys):
- go to the Registry page and create the "HKEY_LOCAL_MACHINE\Software\MyKey" registry key
- add the Subfeature1 registry values in it
- go to the Install Parameters page and create a custom property (for example MY_REG_KEY)
- set its value to the name of your custom registry key (MyKey)
- go to the "Registry" page and select the parent key of your custom registry key (HKEY_LOCAL_MACHINE\Software)
- create under it a new registry key
- rename it to the custom property you created ([MY_REG_KEY])
- now you should have these keys:

Code: Select all

HKEY_LOCAL_MACHINE\Software\MyKey
HKEY_LOCAL_MACHINE\Software\[MY_REG_KEY]
- add the Subfeature2 registry values in the [MY_REG_KEY] key
Note that when you add registry entries in the "Registry" page, you can select the feature in which they are added by using the "Feature" combo on the toolbar.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”