WIX ServiceInstall - 将服务设置为在 NetworkService 帐户下运行 [英] WIX ServiceInstall - setting the service to run under the NetworkService account

查看:22
本文介绍了WIX ServiceInstall - 将服务设置为在 NetworkService 帐户下运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个 WIX 安装程序来安装我的 Windows 服务以在 NetworkService 帐户下运行,并在安装过程中出现权限不足错误.

我发现这篇文章似乎有人遇到了同样的问题,但没有提供真正的解决方案:

http://n2.nabble.com/Re-WiX-users-Digest-Vol-40-Issue-129-td3782055.html

我敢肯定有人之前一定已经实现了这一点,并想知道他们是否愿意分享代码片段?

解决方案

注意:下面的答案仅与提出问题时 WIX 和 Windows 的旧版本相关.如果您设置本机NT AUTHORITY"域和NetworkService"帐户(现在不需要空间),WIX 服务凭据的版本将起作用.

<小时>

原答案:

正确的身份名称是NT Authority\Network Service"而不是NT Authority\NetworkService".需要一个空格才能工作.

有趣的是,默认的LocalSystem"直接与 WIX 3.5 配合使用,但对于其他知名帐户,您必须以NT Authority..."为前缀,例如LocalService"在直接使用时也不起作用.

即解决这个问题:

Account='NT Authority\Network Service'

I am trying to create a WIX installer to install my windows service to run under the NetworkService account and getting an Insufficient Priviledges error during the installation.

I found this post where someone seems to be experiencing the same problem but no real solution was offered:

http://n2.nabble.com/Re-WiX-users-Digest-Vol-40-Issue-129-td3782055.html

I'm sure someone must have acheived this previously and wondered if they'd be kind enough to share a code snippet?

解决方案

NOTE: The answer below is only relevant on the older builds of WIX and Windows at the time the question was raised. The current version of the WIX service credentials will work if you set the native "NT AUTHORITY" domain and "NetworkService" account (no space necessary now).


Original Answer:

The correct identity name is "NT Authority\Network Service" not "NT Authority\NetworkService". A space is required then it works.

Funny that the default "LocalSystem" works directly with WIX 3.5, but for other well known accounts you have to prefix with "NT Authority...", for example "LocalService" does not work either when used directly.

i.e. fix this with:

Account='NT Authority\Network Service'

这篇关于WIX ServiceInstall - 将服务设置为在 NetworkService 帐户下运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆