mirza
Posts: 9
Joined: Wed Jan 13, 2016 3:11 am

How to enable/disable dialog controls at run time

I am building an installer package that needs to create Windows service either user system log in account or username/password given by user (as in attached image).

1. I need to disable username/password text input controls as per radio button selection (disable them on 'Use System Account' and enable them on 'Enter Credentials'). Should be fairly easy thing but as I am beginner so not getting it done.

2. Secondly, I need to pass this user input (if given) to the service to be created
ad.png
ad.png (3.81 KiB) Viewed 5126 times


Any idea how to do these two tasks??
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to enable/disable dialog controls at run time

Hello and welcome to Advanced Installer forums,
1. I need to disable username/password text input controls as per radio button selection (disable them on 'Use System Account' and enable them on 'Enter Credentials'). Should be fairly easy thing but as I am beginner so not getting it done.
You can enable and disable the Password and User Name fields through their Control Conditions. Also, I've attached a sample project that implements this scenario.
2. Secondly, I need to pass this user input (if given) to the service to be created
To install a service for a user, please follow the steps from the How to install a service for a custom user? article.

Should there be any difficulties you encounter implementing something, please do not hesitate to contact me and I will gladly assist you.

Best regards,
Dan
Attachments
Sample Project.zip
(3.14 KiB) Downloaded 776 times
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mirza
Posts: 9
Joined: Wed Jan 13, 2016 3:11 am

Re: How to enable/disable dialog controls at run time

Thanks for prompt response.

All done now :)
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to enable/disable dialog controls at run time

You're welcome,

If you have other questions, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mirza
Posts: 9
Joined: Wed Jan 13, 2016 3:11 am

Re: How to enable/disable dialog controls at run time

For those who need extra information. Following is easiest way to pass username and password while creating service.

Where [USER_NAME] and [USER_PASSWORD] are the text filed properties.
ad1.png
ad1.png (2.68 KiB) Viewed 5112 times
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to enable/disable dialog controls at run time

Hi Mirza,

Thank you for sharing this with us. I'm sure it will help other users.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”