This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- CheckBox value not set properly
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
02:38 PM
CheckBox value not set properly
Hi,
I need a quick fix for a CheckBox problem: it is in the SetupCompleteSuccess dialog, and we set it's 'Property' to be 'MY_PROPERTY', during the installation, we read the value of 'MY_PROPERTY' and expect that value will be reflected in the checking status of the check box. But the check box is always checked (I believe that means it's 'Value' is set to 1), eventhough 'MY_PROPERTY' value has been confirmed to be 0.
Does anybody know where should I go to fix this? We don't change anything for the checkbox in our code. And the defined/default 'Value' for the checkbox is 1, but that is NOT the problem - I have changed it to 0 or empty, the problem still remains (checkbox checked disregarding MY_PROPERTY's value).
I need to have the fix ASAP, I know it could be an easy one for somebody who knows it, but I didn't play that much with dialogs/checkbox, so plese help.
Thanks,
Peter
I need a quick fix for a CheckBox problem: it is in the SetupCompleteSuccess dialog, and we set it's 'Property' to be 'MY_PROPERTY', during the installation, we read the value of 'MY_PROPERTY' and expect that value will be reflected in the checking status of the check box. But the check box is always checked (I believe that means it's 'Value' is set to 1), eventhough 'MY_PROPERTY' value has been confirmed to be 0.
Does anybody know where should I go to fix this? We don't change anything for the checkbox in our code. And the defined/default 'Value' for the checkbox is 1, but that is NOT the problem - I have changed it to 0 or empty, the problem still remains (checkbox checked disregarding MY_PROPERTY's value).
I need to have the fix ASAP, I know it could be an easy one for somebody who knows it, but I didn't play that much with dialogs/checkbox, so plese help.
Thanks,
Peter
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
03:15 PM
Actually, if you want it unchecked, you need to set the property to null, not 0. If the property has any value at all, the checkbox will be checked.
You can do this in code by
MsiSetProperty(hMSI, "PROPERTY", "");
and there are a few other ways, too.
You can do this in code by
MsiSetProperty(hMSI, "PROPERTY", "");
and there are a few other ways, too.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
04:00 PM
Thank you Sairen for your prompt reply.
If I understand you correctly, there is no way to make the checkbox to reflect the value of the property? What I want is: when MY_PROPERTY is 0, the checkbox is unchecked, if MY_PROPERTY is 1, it's checked.
What you said is kind of opposit to it: when the box is checked , the property is set to 1, if it's not checked it's set to null, right?
There will be an action (DoAction) triggered if the box is checked, and the property value is composed as port of the condition for triggering the action, so I can't change the value of property to just make the box unchecked. Do you know a workaround for that?
Thanks,
Peter
If I understand you correctly, there is no way to make the checkbox to reflect the value of the property? What I want is: when MY_PROPERTY is 0, the checkbox is unchecked, if MY_PROPERTY is 1, it's checked.
What you said is kind of opposit to it: when the box is checked , the property is set to 1, if it's not checked it's set to null, right?
There will be an action (DoAction) triggered if the box is checked, and the property value is composed as port of the condition for triggering the action, so I can't change the value of property to just make the box unchecked. Do you know a workaround for that?
Thanks,
Peter
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2009
04:28 PM
I don't think it's opposite at all; in fact, you're very close.
Box is checked, Property = 1
Box is not checked, Property is NULL (not 0 - that's the only difference)
The condition you want, then, is not
MY_PROPERTY =0, but rather NOT MY_PROPERTY
if (MY_PROPERTY=1) ie, the checkbox is checked do something
if (NOT MY_PROPERTY) ie, the checkbox is not checked do something else or do not do something.
Is that what you needed?
Box is checked, Property = 1
Box is not checked, Property is NULL (not 0 - that's the only difference)
The condition you want, then, is not
MY_PROPERTY =0, but rather NOT MY_PROPERTY
if (MY_PROPERTY=1) ie, the checkbox is checked do something
if (NOT MY_PROPERTY) ie, the checkbox is not checked do something else or do not do something.
Is that what you needed?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jun 21, 2013
02:14 AM
I found the solution after struggling for 3-4 times.
You need to do 1 important thing for this.
Bind your check box with Public property by using Upper case (Capital) letters which is defined in Property Manager section under Behavior and logic.
In Value section of your property in property manager Don't give any value (Neither 1 nor 0), instead just keep it blank.
Use the same property in your required dialog & Under Value section of you property in actual dialog assign value = 1. It signifies that when check box is checked, then it's value will be set to 1.
And now initially my check box is unchecked..!!
By doing so,my problem gets solved, Hope it will work for you..!!
Thanks,
Vinay India
You need to do 1 important thing for this.
Bind your check box with Public property by using Upper case (Capital) letters which is defined in Property Manager section under Behavior and logic.
In Value section of your property in property manager Don't give any value (Neither 1 nor 0), instead just keep it blank.
Use the same property in your required dialog & Under Value section of you property in actual dialog assign value = 1. It signifies that when check box is checked, then it's value will be set to 1.
And now initially my check box is unchecked..!!
By doing so,my problem gets solved, Hope it will work for you..!!
Thanks,
Vinay India