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!

TeraCorp
Posts: 1
Joined: Thu Jun 08, 2017 2:03 am

Windows Service Username / Password Prompt

I need to install a service but it needs more permissions than the 3 options (Local System, Local Service, Network Service) that are available.
Is there a way (via custom action or otherwise) to let me prompt the user to enter a username and password that can then be inserted into the service installation so they don't have to go manually change it post-install?

Thanks.
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Windows Service Username / Password Prompt

Hello,

This can be done by creating a new dialog which prompts the user to enter the username and password. These values will be stored in two properties that could be passed as an argument to the service.

This in the complete method:

1. Go to "Dialogs" page and click "New Dialog" toolbar button. Drag this new dialog on the preferred location in the dialogs sequence.
2. Crate two edit boxes, one for the username and one for the password. The password edit box should have the "Password" attribute set to true in the right pane. In this way, its content will be displayed as a password.
3. Set the properties names assigned to these edit boxes to "USERNAME_PROP" and "PASSWORD_PROP". This can be done by editing the "Property Name" field in the Properties right pane.
4. Go to "Services" page and select your service from "Services to Install". Go to "Arguments" field and enter the formatted references for your username and password properties : "[USERNAME_PROP]", "[PASSWORD_PROP]"

Please let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”