WiX v3.6 PermissionEx - Sddl attribute required?

夙愿已清 提交于 2019-12-11 07:28:46

问题


Really?

I am trying to do something like this -

<PermissionEx
              User="Authenticated Users"
              GenericAll="yes"
              ServiceChangeConfig="yes"
              ServiceEnumerateDependents="yes"
              ChangePermission="yes"
              ServiceInterrogate="yes"
              ServicePauseContinue="yes"
              ServiceQueryConfig="yes"
              ServiceQueryStatus="yes"
              ServiceStart="yes"
              ServiceStop="yes" />

and it is giving me

The required attribute 'Sddl' is missing.

Not familiar with Sddl. How do I create an Sddl string to match the above permissions?


回答1:


PermissionEx is the tag for MSI 5.0's MsiLockPermissionsEx functionality, which requires an SDDL string. There's also a PermissionEx tag in WixUtilExtension, which allows similar functionality on all versions of MSI. You're using the former with the latter's attributes. If you want the WixUtilExtension variant of PermissionEx, use the WixUtilExtension namespace:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
...
<util:PermissionEx ... />



回答2:


Either use the API ConvertSecurityDescriptorToStringSecurityDescriptor or work it out in your head following the format described on MSDN article Security Descriptor String Format. Or look for examples of what you need online.



来源:https://stackoverflow.com/questions/10222676/wix-v3-6-permissionex-sddl-attribute-required

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!