hi5_emeh
Posts: 5
Joined: Thu Dec 06, 2012 10:24 am

Custom Action to fetch data from registry

Hi,

I am currently having an issue when fetching data from registry.

I have created an msi that uses public properties. During install the property values can be set to anything desirable. I am also using advertised shortcuts. The issue here is that these values are set in current user and in HKLM/Uninstall so when the next user logs on default values are set, not the values entered in current user.

I have also made a search action that fetches the data from HKLM/Uninstall. How do I create a custom action that fetches the values from the search action and adding it to current user when the next person logs on. Currently, as I mentioned the default values are set when a new user logs on.

Thanks in advance

Regards,
Emil Ehssani
hi5_emeh
Posts: 5
Joined: Thu Dec 06, 2012 10:24 am

Re: Custom Action to fetch data from registry

Just to clarify what I mean.

I have two public properties

DBNAME = dbname (default, can be changed during install)
DBSERVER = dbserver (default, can be changed during install)

Then i have a registry entry in HKCU that adds the values given during install.
It also adds the values to HKLM/Software/Microsoft/Windows/Currentversion/Uninstall/Productcode


Example.
Lets say that I call DBNAME = 1 and DBSERVER = 2 during install. Program installs correctly, values are set to 1 and 2. If i then log out and log in with another user, the values are no longer 1 and 2, now the values are dbname and dbserver.

So my question is, how do I solve that issue? What I have been trying to do is a search action that fetches the values from HKLM/Software/Microsoft/Windows/Currentversion/Uninstall/Productcode. I believe that I should be able to use a custom action to set the values to HKCU when the new user logs on and starts the program, the question is how do I get this to work

Any help would be icredibly appreciated since this has become a top priority.

Regards,

Emil Ehssani
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom Action to fetch data from registry

Hello Emil and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can use our properties persistence feature. Go to "Install Parameters" page, add the related properties (DBNAME and DBSERVER) and in the "Edit Property" dialog enable the "Set persistent property" option.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hi5_emeh
Posts: 5
Joined: Thu Dec 06, 2012 10:24 am

Re: Custom Action to fetch data from registry

Hi Daniel,

They are already in there, how ever I have no option for setting it to persistent, guessing that is because of an older version. We are gonna upgrade soon. I don't know if this is going to work. If i set the values to persistent wouldn't that mean that those values will always be set? I mean the default values.

Regards,

Emil
hi5_emeh
Posts: 5
Joined: Thu Dec 06, 2012 10:24 am

Re: Custom Action to fetch data from registry

Hi Daniel,

After upgrading to the latest version the problem was solved. Thank you for the help.

Sincerely,

Emil
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Custom Action to fetch data from registry

You're welcome. Glad to help.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”