1
votes

I have a WiX Installer which writes to the Windows Registry: HKLM\Software\Foo

Foo and its descendants should be only editable by Administrators (Users will only be able to read)

The real case is that Foo (in previous releases) have been written with editable permission for Users (!!).

Considering this situation, how would you explicitly remove Users writable permission in Foo (and its descendant)?

I've tried PermissionEx (from util wix extension) with no good results at all (permission are not changed). Code:

<Component Id="ComponentId" Guid="[GENERATE-GUID]]">
    <RegistryKey Id="reg857CD83358A344C2982DC6BA6B047754" Root='HKLM' Key='SOFTWARE\Foo' Action='createAndRemoveOnUninstall'>
      <util:PermissionEx User="Users" GenericRead="yes" Read="yes" GenericWrite="no"/>
      <RegistryValue Id="regFD4780BBE853437A9D778D0B51D2E6AD" Type='string' Key='Bar' Name='prop_name' Value='prop_value' KeyPath="yes"/>
    </RegistryKey>
</Component>
1
Please post your answer as an answer and accept it when you are satisfied that it is the best answer.Tom Blodget

1 Answers

2
votes

Using WiX Permission Builtin instead of util:PermissionEx extension seems to do the trick. However you'll have to set permission in each object.

The next post was helpful to me: Wix RegistryKey Permission