如何使用 WiX 将交互式用户添加到本地化 Windows 中的目录? [英] How do I add the interactive user to a directory in a localized Windows using WiX?
问题描述
如何添加瑞典语交互用户,
How do I add the Swedish interactive user,
NT INSTANS\INTERAKTIV
或英文互动用户,
NT AUTHORITY\INTERACTIVE
或任何其他对程序文件夹的 ACL 具有写入权限的本地化用户组?
or any other localised user group with write permissions to a program folder's ACL?
这个问题实际上是我如何使用secureObject"?我无法使用 LockPermissions 表,因为我不明白继承被删除.secureObject 权限似乎需要 CreateDirectory 而不是 Directory...
Is this question actually "How do I use secureObject"? I cannot use the LockPermissions Table because I undestand inheritance is removed. secureObject permissions seem to require CreateDirectory rather than Directory...
推荐答案
使用最新版本的 Wix,您可以通过属性检索常用的内置用户和组名称的本地化名称.例如,WIX_ACCOUNT_NETWORKSERVICE
包含网络服务帐户的本地化名称.不幸的是,截至 3.0.4513 NT AUTHORITY\INTERACTIVE
不在其中.
With recent releases of Wix, you can retrieve the localized names of often-used built-in user and group names via a property. For example, WIX_ACCOUNT_NETWORKSERVICE
contains the localized name of the Network Service account. Unfortunately, as of 3.0.4513 NT AUTHORITY\INTERACTIVE
is not among them.
存在一个示例 MSI 自定义操作,可为许多内置用户和组名称创建属性.从这里获取.将 CA 添加到您的 Wix 安装程序并在安装执行序列的早期安排它.
There exists a sample MSI custom action that creates properties for many of the built-in user and group names. Get it here. Add the CA to your Wix installer and schedule it early in the install execute sequence.
获得本地化帐户名称后,添加 PermissionEx 元素以修改目录的 ACL.例如:
Once you have the localized account name, add a PermissionEx element to modify your directory's ACL. For example:
<Directory ...>
<Component ...>
<CreateFolder>
<PermissionEx User="[SID_INTERACTIVE]" .../>
</CreateFolder>
</Component ...>
</Directory ...>
这篇关于如何使用 WiX 将交互式用户添加到本地化 Windows 中的目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!