简体   繁体   中英

installutil not setting logon account username and password

I'm trying to install a new windows service (command line), which succeeds, however for my testing purposes I need to set a specific account/user and password. I've read plenty of posts and articles arguing I should use:

installutil /user=domain\user /password=password /unattended c:\path\to\exe

which successfully installs my service however when I go into the services window the "Log On As" user is set to "Local System" instead of the username and password i provided, as if it's been ignored. Am I missing something or are these parameters not what they're intended for?

Did you have added Installer(right clicking on design of service->Add Installer) for your service? Can you check the properties for ServiceProcessInstaller instance like below, 在此处输入图片说明

Check whether Account is set to user and if it is Local system just change it. And while you are installing using installutil you will be prompted for username/password. Use this for testing purpose and once you are deploying rechange the same.

Hope it helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM