[wix-users] util:PermissionEx works for HKLM but fails for HKCU

Christopher Painter chrpai at iswix.com
Tue Mar 17 08:41:42 PDT 2020


I have a a component that creates a key if it doesn't exist and sets the permissions on it.   It works just fine if the root is HKLM but if the root is HKCU I get the error:

MSI (s) (38:40) [10:31:36:028]: Executing op: ActionStart(Name=ExecSecureObjects,,)
Action 10:31:36: ExecSecureObjects.
MSI (s) (38:40) [10:31:36:029]: Executing op: CustomActionSchedule(Action=ExecSecureObjects,ActionType=11265,Source=BinaryData,Target=**********,CustomActionData=**********)
MSI (s) (38:20) [10:31:36:030]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI4A61.tmp, Entrypoint: ExecSecureObjects
MSI (s) (38:E8) [10:31:36:030]: Generating random cookie.
MSI (s) (38:E8) [10:31:36:034]: Created Custom Action Server with PID 12628 (0x3154).
MSI (s) (38:D0) [10:31:36:051]: Running as a service.
MSI (s) (38:D0) [10:31:36:052]: Hello, I'm your 32bit Elevated Non-remapped custom action server.
ExecSecureObjects:  Error 0x80070002: failed to get security info for object: CURRENT_USER\SOFTWARE\Test
CustomAction ExecSecureObjects returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 10:31:36: InstallFinalize. Return value 3.


      <Component Id="reg" Guid="{8C148CB0-19DC-4D83-B917-E6294A01F90B}">
        <RegistryKey Id="regKey1" Root="HKLM" Key="SOFTWARE\Test" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="no" Action="create">
          <RegistryValue Id="test" Name="test" Value="test" Action="write" Type="string" KeyPath="yes" />
          <util:PermissionEx User="Everyone" GenericWrite="yes" />
        </RegistryKey>
      </Component>


What am I missing?  Should this work?



More information about the wix-users mailing list