jdixon
Posts: 18
Joined: Sat Jan 04, 2014 8:50 pm

Reading / Writing DWORD registry values

In my installer I have DWORD registry key values being created on the first install. These are tied to install parameters and there is a dialog where they can adjust the values during the install.

Now during the upgrades (increment version number) I am not showing the settings dialog where they enter the values (using the NOT OLDPRODUCTS) and I have a search reading the registry keys. Since they are DWORDS they are being read with a # in front of them which I hear is normal for Advanced Installer.

My question is how can I just leave these values alone during upgrades? I don't need them to be changed at all.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Reading / Writing DWORD registry values

Hello,

You could condition the components associated with these registry values to be installed only on first time install.

Just go to "Organisation" page, select the component and enter "NOT OLDPRODUCTS" in the "Condition" field.

In this way the registry values will not be installed when an upgrade is detected.

If this isn't helpful, please send us the .AIP (project) and a verbose log of the installation to support at advancedinstaller dot com so we can have a better view of your scenario.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jdixon
Posts: 18
Joined: Sat Jan 04, 2014 8:50 pm

Re: Reading / Writing DWORD registry values

I thought I tried that and on the upgrade it completely removed the registry values. I'll try again.

Also this issue is when Advanced Installer reads the registry DWORD values with my search, it returns a string value with a # in front of it. My understanding this is by design but the problem is my settings dialog lets you input the values during the install (and skip settings on upgrade). So if i'm reading the values from the registry and storing it in the global parameters, I think advanced installer is saving it as ##5 instead of #5 which converts it to a string.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Reading / Writing DWORD registry values

Hello,
I thought I tried that and on the upgrade it completely removed the registry values. I'll try again.
I forgot to mention you need to enable "Permanent" option for the components in questions. During a major upgrade the old package is removed first and then the new one is installed. With "Permanent" option enabled the components in question will not be removed.

Regarding your other issue, please take a look on this topic : Searched numeric registry raw value prepended with #

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”