WiX - 尝试使用 util:PermissionEx 设置服务的权限并收到错误 1 [英] WiX - Trying to set the permissions of a service using util:PermissionEx and getting an Error 1
问题描述
问题 WiX - 安装 Windows 服务并授予权限正是我想要做的.首先,我添加了 UtilExtension
命名空间,如下所示:
The question WiX - Install Windows Service and give permissions is exactly what I am trying to do. First I have added the UtilExtension
namespace like this:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
然后我将以下内容添加到 ServiceInstall
元素:
Then I have added the following to the ServiceInstall
element:
<util:PermissionEx
User="Authenticated Users"
GenericAll="yes"
ServiceChangeConfig="yes"
ServiceEnumerateDependents="yes"
ChangePermission="yes"
ServiceInterrogate="yes"
ServicePauseContinue="yes"
ServiceQueryConfig="yes"
ServiceQueryStatus="yes"
ServiceStart="yes"
ServiceStop="yes" />
最后编译器给我提供了以下错误信息:
Finally the compiler provides me with the following error message:
错误 1 ServiceInstall 元素包含未处理的扩展元素util:PermissionEx".请确保扩展为'http://schemas.microsoft.com/wix/UtilExtension' 中的元素已提供命名空间.
Error 1 The ServiceInstall element contains an unhandled extension element 'util:PermissionEx'. Please ensure that the extension for elements in the 'http://schemas.microsoft.com/wix/UtilExtension' namespace has been provided.
我还需要做些什么来确保已提供元素的扩展?我该如何解决这个问题?
Is there something else I need to do to ensure the extension for the elements has been provided? How do I fix this?
推荐答案
您需要将 WiX Util 扩展 dll 的引用添加到您的项目中.
You need to add the reference to the WiX Util extension dll to your project.
- 在您的项目下,右键单击引用
- 选择添加参考
- 选择 WixUtilExtension.dll 并选择 Add
这篇关于WiX - 尝试使用 util:PermissionEx 设置服务的权限并收到错误 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!