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>