gerhard
Posts: 3
Joined: Wed Feb 18, 2015 4:18 pm

Using property as registry value

Hi,

I have various builds which must each write a different value to a registry key. So I created a property with values defined for each build. When I define the registry key as a DWORD then it fails to create. If I make it a string the key is created but the value is empty.

What must I do to get the behavior I want?

I hope this is enough information to get help.

Regards,
Gerhard
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Using property as registry value

Hello Gerhard and welcome to Advanced Installer forums,
I have various builds which must each write a different value to a registry key. So I created a property with values defined for each build. When I define the registry key as a DWORD then it fails to create.
If the property value does not represent a number, the registry entry will fail to create them as DWORD.
If I make it a string the key is created but the value is empty.
This may happens if the property is empty. In order to have a better view about this, can you please send us the .AIP (project file) and a verbose log of the installation process to support at advancedinstaller dot com so we can investigate it? If it contains confidential information you can send us a small test project which reproduce this behaviour.

In order to add registry keys and values to your package, please follow the steps from the Add registry article.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
gerhard
Posts: 3
Joined: Wed Feb 18, 2015 4:18 pm

Re: Using property as registry value

Hi Dan,

I have looked at the log and the installer is trying to write the value "#" into the REG_DWORD type key which will obviously fail. The question is where does the # come from? Like I said before, I created an Install Parameter which I have given the value 1 (no quotes or hashes) for the particular build I am testing.

If there is not an easy fix/explanation for this, I will send you the project file and log.

Regards,
Gerhard
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: Using property as registry value

Hi Gerhard,
I have looked at the log and the installer is trying to write the value "#" into the REG_DWORD type key which will obviously fail. The question is where does the # come from?
In the Registry table inside the MSI database, the "#" prefix attached to the "Value" field causes the value to be interpreted and stored as an integer value (REG_DWORD).
For details, please check the Registry Table article.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”