REG_DWORD value changes after patch upgrade to REG_SZ - Advanced Installer Community

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!

swissiws
Posts: 4
Joined: Wed Aug 23, 2006 2:19 pm

REG_DWORD value changes after patch upgrade to REG_SZ

Hi All

I am having problem with Project Setting search. I do have several Registry keys and values, getting installed with the original msi file and later modified with the program application.

Creating a patch file, i search for the current registry key values, raw value, REG_DWORD and REG_SZ.

After i run the patch, all existing REG_SZ values are taken over correctly and not being modified. All REG_DWORD values have changed to REG_SZ and have the value # in front. For example if the REG_DWORD value was 1, after patching, the value will be #1 and changed to REG_SZ!!????

Any idea are very appreciated.

Thanks!
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

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).

If a Registry Search is performed for a registry value whose data contains a REG_DWORD value, the Property that holds the result of the search will have a "#" prefixed to the actual value. Hence, if the value of this Property (the result of the Search) will be written in the registry as a REG_DWORD value (that is, the 3rd radio button is selected in the "Edit Registry Entry" dialog), an additional "#" will be prefixed at install time. As a consequence, because the value begins with two consecutive number signs (#), the first "#" is ignored and the value is interpreted and stored as a string (as explained in the Windows Installer SDK).

The solution to this is to select "String" (the first radio-button in the "Edit Registry Entry" dialog) when the data is set to the value of a Property (ie [MY_DWORD]) that already has a "#" prefixed.

If this not the problem you are referring to, please send a simple test case (all AIP, MSI and MSP files) to our support address (support at advancedinstaller dot com).

Hope this helps.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
swissiws
Posts: 4
Joined: Wed Aug 23, 2006 2:19 pm

Thanks Ionut,

thats exactly what i am experience. the issue is, that i do need D-WORD values. i can not really change them to STRINGS.



for your better understanding, i try to explain again what i am after:

1) 1.msi creates and REG-DWORD (test) with the value 1.
2) my application reads the value test and does modify the value to 2.

3) installation of patch.msp. the patch (should) read the existing value AND not modify it. therefore, it (should) stay as REG-DWORD with value 2 after the patch is successful deployed.

I hope this gives a bit more clarification in what i am after.

Thanks again for you help!

Matt
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,
installation of patch.msp. the patch (should) read the existing value AND not modify it. therefore, it (should) stay as REG-DWORD with value 2 after the patch is successful deployed.
For the Upgraded MSI package you would create a Registry Search. In the Registry page you would use the Property that holds the result of the Search as the "Data" of the registry value.

As stated above, the value of this Property already contains a "#" (because the registry value is a DWORD). Writing this value as a String, would cause the value to be stored as a DWORD. On the other hand, writing the value as a DWORD, would cause another "#" to be prefixed, which will result in a String being written eventually.

Hence, you need to set the type of the registry value to "String" in the "Edit Registry Entry" dialog (it will be interpreted as a DWORD at install time because it has the "#" prefix).

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”