How to set folder permissions on install in a localizable fashion
I have an installation build with WiX 3.0. It currently creates some folders and modifies the folder permissions. However, it will not install on a Spanish OS. That is now a problem since we have to support Spanish OS's. So... I am trying to do this in a way that is localizable. This is what I have changed it to:
<CreateFolder Directory="JPROLogs" >
<util:PermissionEx User="[WIX_ACCOUNT_ADMINISTRATORS]" GenericAll="yes" />
<util:PermissionEx User="[WIX_ACCOUNT_USERS]" GenericAll="yes" />
</CreateFolder>
But I get the install now fail开发者_开发百科s on English OS's and Spanish OS's with the following error:
ExeSecureObjects: Error 0x80070534: failed to get sid for account: NOREGON-B3BC733\BUILTIN\Administrators
Any ideas where I have gone wrong?
The account names do not get translated when other languages are involved. We used an approach to translate the names based on the know SID's, via custom actions, to get around this.
An approach is outlined at: http://social.msdn.microsoft.com/forums/en-US/vssetup/thread/39d9e905-2b35-4ce9-a544-4564f6b5a376
Try to reference the well-known accounts and groups by predefined aliases. For your case:
<CreateFolder Directory="JPROLogs" >
<util:PermissionEx User="Administrators" GenericAll="yes" />
<util:PermissionEx User="Users" GenericAll="yes" />
</CreateFolder>
I used this:
<util:PermissionEx User="Everyone" GenericAll="yes" />
And that was enough for me. Don't know if that will be your issue too. Hope it helps!
精彩评论