[wix-users] Custom action having difficulty writing to registry

Edwin Castro egcastr at gmail.com
Tue May 5 10:37:48 PDT 2020


Perhaps there's a bitness mismatch between what you expect and reality?

How are you locating powershell.exe?

Actually, can you show us all your authoring related to this powershell
script? How is it installed? How is it run?

--
Edwin G. Castro


On Mon, May 4, 2020 at 6:46 PM Griesshammer, Christoph (GE Healthcare) via
wix-users <wix-users at lists.wixtoolset.org> wrote:

> Hey everyone,
>
> I am hoping someone can help me understand why my custom action is having
> difficulties writing to the registry. I KNOW there are built in tools to
> write registry entries, however, we have a PowerShell script file that is
> delivered by the installer, and we then run this as a custom action. The
> PowerShell script also has to run in other scenarios, so it really can't be
> integrated into the installer other than a custom action that runs the
> script directly.
>
> The PowerShell script tries to write to the registry at HKLM:\Software\...
>
> I know our installer creates the registry key appropriately because it was
> always working, but now this new script fails with an error indicating the
> key is invalid.
>
> My custom action is deferred with impersonate set to no, and it is
> scheduled between InstallInitialize and InstallFinalize.
>
> Also, related, we saw a similar issue with accessing files from these
> scripts that were down in C:\Windows\System32\.
>
> Are these blocked locations or something? I've read about some virtual
> registry or something in older versions of Windows used by installers?
>
> Thank you for your time!
>
> Christoph Griesshammer
> Senior Software Engineer
> GE Healthcare Digital
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-users mailing list