cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
xzz0195
Level 3

Adding Checkbox

Newbie here....
We want a checkbox on initial dialog for install that allows us to log the installation steps.

We can easily drag the checkbox onto the form, but can't for the life of us figure out how to get addressability to the check value? In C# it's if(checkbox.Checked). How do we define or find the property that tells us if it's checked? Also do we have to set up an event handler to caputure the check changed event? Or will we have visibility to the value once the NEXT button is pressed on the install?
Labels (1)
0 Kudos
(5) Replies
Gvarma
Level 7

xzz0195 wrote:
Newbie here....
We want a checkbox on initial dialog for install that allows us to log the installation steps.

We can easily drag the checkbox onto the form, but can't for the life of us figure out how to get addressability to the check value? In C# it's if(checkbox.Checked). How do we define or find the property that tells us if it's checked? Also do we have to set up an event handler to caputure the check changed event? Or will we have visibility to the value once the NEXT button is pressed on the install?


Whats your project type?
0 Kudos
xzz0195
Level 3

Install script msi project
0 Kudos
xzz0195
Level 3

Bump? Anyone?
0 Kudos
RobertDickau
Flexera Alumni

It takes a bit of coding to process a control added to an existing InstallScript dialog box, but please see the help topics under Creating Installations > Defining the End-User Interface > Working with Dialogs > Working with Dialogs in InstallScript..., especially "Adding Controls to the Dialog in an InstallScript or InstallScript MSI Project".
0 Kudos
Gvarma
Level 7

xzz0195 wrote:
Install script msi project


I have done it many many times, its very easy, you would need to do following

1. create a check box on your dialog box thru dialog box editor
2. Note down the control id (normally 4 digits).

3. create a .rul file wid the same name as your dialog box and store in MAIN directory under installshield where other .rul for dialog boxes are stored (or you could import it).
4. Open an existing .rul file e.g sdwelcome.rul.

5. Add a CONSTANT on top of this file say CHECKBOX1 xxxx (control id).

6. you need to have a variable declared to get the status of this check BOX say bCHKSTAT.
7. After DialogInsilize code add a case statement say CASE : Controlid (or some like this).
8. under case statement use GetControl (something like this) to get the current stattus of your checkbox and use SetControl to set the current status of check box in a var.

There is have it..

if I were you i would declare a GLOBAL varialble for setting the status so I could accesss the status in my main Setup.rul.

HTTH
0 Kudos