This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: InstallScrip project. How to start windows service under specific account?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 13, 2011
03:09 PM
InstallScrip project. How to start windows service under specific account?
Hello,
This is InstallScript project. I'm trying to install windows service. The service is installed and started successfully under local account.
How to start it under specific account assuming that the account/username/password is provided?
Could you please provide me with detailed steps of how to do it in InstallShield 2010 IDE, or with some script snippet if it's done programmatically, or point me to some article ot topic?
Your help would be greatly appreciated.
Thank you in advance,
Klim
This is InstallScript project. I'm trying to install windows service. The service is installed and started successfully under local account.
How to start it under specific account assuming that the account/username/password is provided?
Could you please provide me with detailed steps of how to do it in InstallShield 2010 IDE, or with some script snippet if it's done programmatically, or point me to some article ot topic?
Your help would be greatly appreciated.
Thank you in advance,
Klim
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 13, 2011
03:58 PM
Klim,
Hopefully some of these links will help out!
Install NT Service Settings: http://helpnet.flexerasoftware.com/robo/projects/installshield16helplib/ComponentInstallNT.htm
Configuring a Component to Install or Uninstall a Windows Service: http://helpnet.flexerasoftware.com/robo/projects/installshield16helplib/IHelpAdvNTServ.htm
Install windows service: http://community.flexerasoftware.com/showthread.php?t=175189&page=2
Starting and Stopping a Service in Basic MSI: http://community.flexerasoftware.com/showthread.php?t=193496
how do I check if my application is running: http://community.flexerasoftware.com/showthread.php?t=194269
HTH
Hopefully some of these links will help out!
Install NT Service Settings: http://helpnet.flexerasoftware.com/robo/projects/installshield16helplib/ComponentInstallNT.htm
Configuring a Component to Install or Uninstall a Windows Service: http://helpnet.flexerasoftware.com/robo/projects/installshield16helplib/IHelpAdvNTServ.htm
Install windows service: http://community.flexerasoftware.com/showthread.php?t=175189&page=2
Starting and Stopping a Service in Basic MSI: http://community.flexerasoftware.com/showthread.php?t=193496
how do I check if my application is running: http://community.flexerasoftware.com/showthread.php?t=194269
HTH
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2011
12:36 AM
ch_eng wrote:
Klim,
Hopefully some of these links will help out!
Install NT Service Settings: http://helpnet.flexerasoftware.com/robo/projects/installshield16helplib/ComponentInstallNT.htm
Configuring a Component to Install or Uninstall a Windows Service: http://helpnet.flexerasoftware.com/robo/projects/installshield16helplib/IHelpAdvNTServ.htm
Install windows service: http://community.flexerasoftware.com/showthread.php?t=175189&page=2
Starting and Stopping a Service in Basic MSI: http://community.flexerasoftware.com/showthread.php?t=193496
how do I check if my application is running: http://community.flexerasoftware.com/showthread.php?t=194269
HTH
Thank you Cheng.
I installed NTService object and associated it with the Feature I want to install and start as the WinService. And it worked fine: service installed and started under any account I provide in the NTService Wizard. I was able to install service with the option of starting or not starting during the installation.
But the problem is that the acoount and credentials should not be hardcoded by the wizard. They need to be collected from the user during the installation process by presenting dialog box where he could enter the accound and the credentials. And then the service should start under provided account. Any ideas please?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2011
08:57 AM
Klim,
I haven't had to do this but you might want to try setting the "User Name" and "Password" parameters in your service configuration to be InstallShield Properties that you create and populate (ex: [SERVICE_USERNAME]). I would suggest using a property name with all caps anyway. I don't know if that will work, but if you want to try it, remember the specifications mentioned in the first link:
User Name:
Enter the account under which the service will be logged on. To install the service under the local system account, leave this setting blank. (Microsoft does not recommend installing services that impersonate the privileges of a single user.)
If the service type is Win32 that runs in its own process, the value that you enter should use the following format:
DomainName\UserName
If the service will be logged on under the built-in domain, you can use the following format:
.\UserName
HTH
I haven't had to do this but you might want to try setting the "User Name" and "Password" parameters in your service configuration to be InstallShield Properties that you create and populate (ex: [SERVICE_USERNAME]). I would suggest using a property name with all caps anyway. I don't know if that will work, but if you want to try it, remember the specifications mentioned in the first link:
User Name:
Enter the account under which the service will be logged on. To install the service under the local system account, leave this setting blank. (Microsoft does not recommend installing services that impersonate the privileges of a single user.)
If the service type is Win32 that runs in its own process, the value that you enter should use the following format:
DomainName\UserName
If the service will be logged on under the built-in domain, you can use the following format:
.\UserName
HTH