cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
segarram
Level 2

Condition Install Registry DWORD value returns #

: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.
Labels (1)
0 Kudos
(5) Replies
KathyMorey
Level 10

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".
0 Kudos
Tim_Mayert
Level 9

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?
0 Kudos
Kelter
Level 10

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.
0 Kudos
Tim_Mayert
Level 9

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,
0 Kudos
Kelter
Level 10

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.
0 Kudos