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!

DeadlyDonger
Posts: 19
Joined: Wed Jan 07, 2015 6:44 pm

Adding Checkbox

I want to add a checkbox called: "Associate .txt files with program", and by default it should be unchecked. I want to show the checkbox ONLY on install complete dialog and not any other dialog.

When the checkbox is checked or unchecked and depending on the sate of it, when the user clicks on the finish button on the install complete dialog, it should run a script for when it's checked and no script for when it's not checked. How do I do this?
Irina
Posts: 113
Joined: Mon Apr 27, 2015 11:42 am

Re: Adding Checkbox

Hello,

For creating a checkbox, please see the steps described here.

After creating the button, do the following:
- in the Properties section set the "Property Name" field to CHECK
- in the "Text" field set the text of the checkbox (Associate .txt files with program)
- in the "Value" / "Selected" field select "False" (for the button to be unchecked as default)

Further on, for the action you need regarding the checkbox and the Finish button, you have to create a Custom action of type Launch attached file or Launch installed file.

For this, you will have to go to Custom Actions page and add a Launch attached/installed file action without sequence.
You will be prompted to select the file you want.
You don't have to change any other options here, unless you want to define a new name for the action.

Back in the Dialogs page:
- select the "Finish" button
- go to "Published Events" tab, click "New" button, and on the popup window select:
  • "Execute custom action"
    Argument: select your created custom action
    Condition: AI_INSTALL AND CHECK
    press OK button
This should be all.

Do not hesitate to ask more questions if needed.

Regards,
Irina
Ecaterina Irina Grosu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DeadlyDonger
Posts: 19
Joined: Wed Jan 07, 2015 6:44 pm

Re: Adding Checkbox

Everything works fine however, the checkbox is only supposed to show in the first time finish installation dialog. In my case I added a checkbox and after I installed the program and then uninstall the program using the installer, the checkbox is still shown. How do I set the visibility of it to only show during the first time installation process.
Irina wrote:Hello,

For creating a checkbox, please see the steps described here.

After creating the button, do the following:
- in the Properties section set the "Property Name" field to CHECK
- in the "Text" field set the text of the checkbox (Associate .txt files with program)
- in the "Value" / "Selected" field select "False" (for the button to be unchecked as default)

Further on, for the action you need regarding the checkbox and the Finish button, you have to create a Custom action of type Launch attached file or Launch installed file.

For this, you will have to go to Custom Actions page and add a Launch attached/installed file action without sequence.
You will be prompted to select the file you want.
You don't have to change any other options here, unless you want to define a new name for the action.

Back in the Dialogs page:
- select the "Finish" button
- go to "Published Events" tab, click "New" button, and on the popup window select:
  • "Execute custom action"
    Argument: select your created custom action
    Condition: AI_INSTALL AND CHECK
    press OK button
This should be all.

Do not hesitate to ask more questions if needed.

Regards,
Irina
Irina
Posts: 113
Joined: Mon Apr 27, 2015 11:42 am

Re: Adding Checkbox

Hello,

In order for the checkbox to appear only for the first installation of the product, you have to put a condition so that when the package is already installed, the checkbox should be disabled.
You can do that from the Dialogs page.
  • Click on the ckechbox.
    In the Control Conditions tab, click on New button.
    Fill the fields with:
    • Conditon: Installed
      Action: Hide
Kind regards,
Irina
Ecaterina Irina Grosu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”