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

Password Validation when a radio button is selected

Hello,

At the end of the installation of my application, I prompt the user to select one environment from a list of environments via Radio buttons. For example, DEV, Training or Production. Based on the selection of the user a batch files gets executed and copies the required configuration files (I got that to work). What I would like to do is if the user selects production they should be prompt with a password which gets validated. If the password is correct then the batch file should get executed. Otherwise it should abort. Can somebody help me with that if they know how to implement it.
Labels (1)
0 Kudos
(3) Replies
Lurean
Level 8

What method are you needing to use to validate the password? in other words what are you validating against? A web server, SQL, local application?

Each of these could be potentially handled differently.
0 Kudos
TechGuy
Level 3

basically I want to hard code the password in the installshield script so i can get the user to input the password then an if statement can be used to validate the password.

Thanks,
0 Kudos
Lurean
Level 8

you would just need to add a spot on the dialog for a textbox that would become active when the correct option is selected, store the input from the textbox into a property and compare the value of that property to the preset password.

In a basic MSI, you would do this by comparing the two properties that hold the values as part of your conditional statement to execute the batch file. I have not done much work with Installscript so don't know the particulars of how to handle it there.

As to having it abort the installation if they don't match, I am not sure how to execute that exactly, but you should be able to use a condition on your dialog if they don't match to have the next button have the same functionality of the cancel button or you can build a custom dialog for it to go to next that would state that they entered an invalid password and give them the option to go back or cancel the install.
0 Kudos