[英]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. 我正在尝试安装新的Windows服务(命令行),该服务成功,但是出于测试目的,我需要设置特定的帐户/用户和密码。 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? 您是否已为您的服务添加了Installer(右键单击service-> Add Installer的设计)? Can you check the properties for ServiceProcessInstaller instance like below,
您是否可以检查如下所示的ServiceProcessInstaller实例的属性,
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.
并且在使用installutil安装时,将提示您输入用户名/密码。 Use this for testing purpose and once you are deploying rechange the same.
将其用于测试目的,并在部署后对其进行更改。
Hope it helps! 希望能帮助到你!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.