Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Set Property In Registry


1 reply to this topic

riverwind

riverwind
  • Members
  • 6 posts

Posted 01 May 2002 - 12:17

Hi there

In my installation project I would like to extract a value (integer - 0 or 1) from a checkbox during installation. The checked value is set in a global property (USEMSGSPY).
In the Registry part I've made a value (UseMsgSpy), which has the data set to [USEMSGSPY]. When I run the installation, however, the setting in registry is always set to the default value.

Am I doing something wrong, or missing something here?

hteichert

hteichert
  • Members
  • 158 posts

Posted 02 May 2002 - 08:15

A checkbox in a dialog doesn't return 0 or 1. The corresponding property will be empty if the checkbox is unchecked or it will contain the given value if it is checked. If there is any other value in the property, the checkbox will also be checked.
If you want the registry value to contain a 0 or 1 for unckecked/checked you cannot use the property connected to the checkbox. It's necessary to set another property to 0 or 1 depending on the value of the property connected to the checkbox (empty or default).
There are two ways to accomplish this:
1) Use a Custom Action which gets the one property and sets the other depending on the value
2) use entries in the event table of the next button of the dialog containing the checkbox:
Event       Argument     Condition
[MY01PROP]  0           MyCheckProp<>"defvalue"
[MY01PROP]  1           MyCheckProp="defvalue"


MY01PROP would be the property to be used in setting the registry value; defvalue is the value given as default for the checkbox dialog element; MyCheckProp the property of the checkbox.
Hope this helps...
h.teichert-ott