WiX - Trying to set the permissions of a service using util:PermissionEx and getting an Error 1
Asked Answered
A

2

17

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">

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:

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?

Addax answered 19/4, 2012 at 5:13 Comment(1)
Thanks for mentioning that the xmlns needed to be added, I wasn't sure what I was doing wrong.Horsa
D
26

You need to add the reference to the WiX Util extension dll to your project.

  1. Under your project, right-click References
  2. Select Add Reference
  3. Choose the WixUtilExtension.dll and select Add
Diversification answered 20/4, 2012 at 3:41 Comment(0)
P
4

If you're still seeing the squiggle line:

enter image description here

Add the xmlns:util:

xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
Plated answered 9/7, 2013 at 2:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.