PDA

View Full Version : Condition Install Registry DWORD value returns #



Jazzy2009
11-30-2009, 12:31 PM
:confused:
I'm trying to set an install condition based on a DWORD registry value. I did a System Search to "Store the value in a property and use the property in an install condition.

Example:
MyProperty<10 (Message description).

This does not work because the System Search always adds # in front of the stored value. In turn the Install Condition is never correct because the retrieved registry value is stored with a # in front of the value.

Returns #12 instead of 12.

Does anyone know how to resolve this? Your help is much appreciated.

KathyMorey
12-01-2009, 08:33 AM
The "#" indicates that the value returned is a DWORD instead of a string value, by design. Change your condition to look for "#12" instead of "12".

Tim Mayert
01-26-2010, 12:39 PM
I am also getting a key that is a DWORD, but I am using the value of the key to re-set my default property value as well as using it to set a radio button on one of my dialog boxes.

If the value returned has the # infront of it then the Property is set to this and none of my radio buttons are selected. The value is also used to be written back to the registry. Will the # also be written then?

Is there any way to strip the # off of it or do I have to created 7 custom actions to set the value correctly depending on the #value that is returned?

Kelter
01-27-2010, 02:42 PM
i would set the values of your radio buttons to include the #.

your reg entries, i'm assuming, have all been set to property values. initialize the property values with the # prepended.

create all of your reg entries as REGDB_STRING instead of REGDB_DWORD. (i know it sounds funny, but it works) the conversion will happen on the fly.

Tim Mayert
02-01-2010, 08:42 AM
I do not really want to fiddle with the reg entries because the application reads these values as well and they are expecting the value to be a DWORD.

So if there is no easy method then it sounds like I'll have to create a custom action that will have to read the key and set the property accordingly.

If anyone already has a custom action to do this I would appreciate hearing from you.

Thanks,

Kelter
02-02-2010, 08:05 AM
if you create a string reg entry, and teh value is set to a property, and the property is set to "#2", then the registry value created will be a DWORD with the value "2". It does the conversion on the fly based on the prefix. "#%" as a prefix will create a REG_EXPAND value. "#" as a prefix will create a REG_DWORD value. "#x" as a prefix will create a binary value.