sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Show A Dialog On A Checkbox Uncheck?

I can't figure out exactly how to display a dialog (Message Box) when the user unchecks a certain check box in one of our dialogs.

I tried adding a Custom Action to Show Message and try to invoke it as a Published Event on the check box when the associate property is the "unchecked" value to no avail as I get the message box
every time I check or uncheck it AND the message box is displayed behind my installer dialog :-(

Scott
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Show A Dialog On A Checkbox Uncheck?

Hi Scott,

I think you probably didn't set the right condition for the Published Event you created. You can try to use the following event on your check box:
  • Name: Execute custom action
    Argument: MessageBox
    Condition: NOT CHECKBOX_PROP
As for the background problem, a similar problem was discussed in the Application is launched in the background(Windows 7 problem) article.

Let us know if it helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Show A Dialog On A Checkbox Uncheck?

I assume in your example above "CHECKBOX_PROP" is a placeholder for my actual property I defined? For example, [TABPROCGROWTH].
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Show A Dialog On A Checkbox Uncheck?

I set a default value of 1 on the checkbox with a property. By default that property should contain 1 and the checkbox is "checked".

Documentation is not clear what happens to the property in this case when one unchecks the checkbox. Is the property empty?
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Show A Dialog On A Checkbox Uncheck?

Looks like part of my problem was I was setting the checkbox's "Value" to the checkbox property versus the value of the default value (i.e. '1').

If my associated property is a global property though (i.e. one I can assign on a command line) and I want it to drive the state of the checkbox wouldn't the checkbox's Value then be set to the property name?
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Show A Dialog On A Checkbox Uncheck?

The CHECKBOX_PROP in my example is the corresponding property for the check box, the one you said you set a default value of 1.

In case this check box is unchecked the property will be empty. If the check box is checked the property will have the value written in the "Value" text field from the "Properties" panel.

Please keep in mind that the check box doesn't have a value, only its corresponding property can have it.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Show A Dialog On A Checkbox Uncheck?

So I have for the Checkbox's properties:

Value: 1
Default Value: 1
Property: CHECKBOX_PROP


And I do NOT define CHECBOX_PROP in the Install Parameters window of AI.

How do I get the checkbox to reflect the state of the bound property (e.g. be unchecked) if they pass /CHECKBOX_PROP=??? on the command line.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Show A Dialog On A Checkbox Uncheck?

Hi Scott,

If you want to check or uncheck a property in command line you can proceed like in the following example:
  • CHECKBOX_PROP=1 (checked)
    CHECKBOX_PROP="" (unchecked)
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Show A Dialog On A Checkbox Uncheck?

I also ended up adding SET PROPERTY custom actions that CHECK_PROP="0" and then sets CHECK_PROP={} ( I added a CA in the Wizards stage and Install Execution stage (for silent install)).

Easier to tell my customers the command line switch is /CHECK_PROP=1 or /CHECK_PROP=0 vs. /CHECK_PROP="".

I might test your theory though ;)
Scott Jeslis
Senior Software Engineer
Cicero, Inc.

Return to “Building Installers”