How to invert control of check boxes - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

quazer
Posts: 4
Joined: Tue Jan 01, 2013 8:41 am

How to invert control of check boxes

I am little novice with AI.
Basically I want to run a file which takes its arguments from check boxes.

So I have a screen with four check boxes. First three are checked by default and should only pass value when unchecked.
Fourth one is unchecked by default only pass the argument when checked.

So I linked those check boxes 4 new properties. Made a new custom action to launch file upon clicking next and passed those four properties as command line.
Well I am getting fourth one working fine, but first three does not work.
------------------------------------------------------
Checkbox 1 - checked --> no value | Unchecked --> pass argument
Checkbox 2 - checked --> no value | Unchecked --> pass argument
Checkbox 3 - checked --> no value | Unchecked --> pass argument
Checkbox 4 - unchecked --> no value | checked --> pass argument (working)
------------------------------------------------------

Is this a correct way to or any other simple way exist to do this. I am doing wrong somewhere. :?:

Thank You
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to invert control of check boxes

Hello and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.

In order to achieve this you can use another properties which will be set only when the related check box controls will be unchecked. You can proceed like this:
- Go to "Dialogs" page and add three check box controls like this:
  • Value: value1
    Default Value: checked
    Property Name: Check1

    Value: value2
    Default Value: checked
    Property Name: Check2

    Value: value3
    Default Value: checked
    Property Name: Check3
- On the [Next] button and add the following published events:
  • Name: [MY_PROP1]
    Arguments: value1
    Condition: NOT Check1

    Name: [MY_PROP2]
    Arguments: value2
    Condition: NOT Check2

    Name: [MY_PROP3]
    Arguments: value3
    Condition: NOT Check3

    Name: Execute custom action
    Arguments: MyCustom Action
- Build and run your project.

Also, you should use the above MY_PROP1, MY_PROP2 and MY_PROP3 properties in your custom action command line.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
quazer
Posts: 4
Joined: Tue Jan 01, 2013 8:41 am

Re: How to invert control of check boxes

Thanks Friend
Works exactly as I need.

Cheers! :D
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to invert control of check boxes

You're welcome. Glad to help.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”