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

Edwin Castro egcastr at gmail.com
Tue Mar 17 14:04:35 PDT 2020


I suspect the custom action that tries to apply the permission to the key
cannot find it because it is a per-user key and the custom action is
running under the context of a different user. That HKCU key really does
not exist for, likely, SYSTEM or TrustedInstaller or which ever user the
custom action actually runs as. Just a guess...

--
Edwin G. Castro


On Tue, Mar 17, 2020 at 10:39 AM Christopher Painter via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> Since the element is nested under the registry key I assumed it would
> apply the permission after creating the key.  Still, I manually created the
> key before running the installer (32bit and 64bit hives just for good
> measure)  and I still get the error.
>
> ________________________________
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Rob
> Mensching via wix-users <wix-users at lists.wixtoolset.org>
> Sent: Tuesday, March 17, 2020 11:18 AM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Cc: Rob Mensching <rob at firegiant.com>
> Subject: Re: [wix-users] util:PermissionEx works for HKLM but fails for
> HKCU
>
> 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/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-users mailing list