[wix-users] util:PermissionEx works for HKLM but fails for HKCU
Rob Mensching
rob at firegiant.com
Tue Mar 17 09:18:17 PDT 2020
That's file not found
http://errco.de/win32/winerror-h/error_file_not_found/0x80070002/
I *think* that means the registry key name isn't found (and path not found means the key wasn't found).
Short replies here. Complete answers here: https://www.firegiant.com/services/
-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Christopher Painter via wix-users
Sent: Tuesday, March 17, 2020 8:42 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Christopher Painter <chrpai at iswix.com>
Subject: [wix-users] util:PermissionEx works for HKLM but fails for HKCU
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?
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list