writing tothe registry if key is not present - Advanced Installer Community
thierryba
Posts: 3
Joined: Tue Apr 23, 2013 9:30 am

writing tothe registry if key is not present

Hi,

I want to make an installer that can have parameters for the end-user application. The settings are stored in the registry.
Right now I have set install parameters (to set the default values) and registry keys that refer to those install parameters.
The problem I have now is that the parameters passed to the installer are always written to the registry. But what I want is:
if the parameters are not passed to the install and a previous install has set those parameters, I want to keep the registry keys untouched and not overwriting the previous parameters.

I've looked into at custom actions but there doesn't seem to be a way to set install parameters from the registry. I wanted to set those from the registry so that the installer would read the default values from there, hence not changing them by default.

Any idea on how to do that? Should I look into VBScript for that?

Thanks in advance.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: writing tothe registry if key is not present

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

In order to write a property to the registry you can use the "Set persistent property" option when you create it in the Install Parameters page. In this case, the property will be stored to the registry when the application is installed and read from registry when it is upgraded.

Let us know if this helped, otherwise give us more details about your scenario.

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

Return to “Common Problems”