Added sysnative path in a variable to reg.exe so you can reg edit the 圆4 keys from a 32bit process. Here is a nested Archetype function for determining OS bitness + Powershell bitness. When I access any path in registry under HKLM:\Software in it, it is being redirected to HKLM:\Software\Wow6432Node\ and, of course, fails to find the information I need (because it is in the 64-bit registry branch)Ģ) How do I run 64-bit PowerShell from 32-bit SFX?ģ) How do I read 64-bit registry (not Wow6432Node) via 32-bit powershell? (Though I think that's either impossible or will greatly increase the amount of PowerShell code) My problem is that on 64-bit systems, 32-bit (x86) version of the PowerShell launches.
I didn't test it out, but I think on 32-bit computers everything will run fine. Using Test-Path and Get-ItemProperty cmd-lets Inside the powershell script I do many things, including checking some registry keys under this branch: HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components
To do that, I use method described here: Īfter file extraction I want to run a powershell script, so here is my config.txt file contents: InstallCU.bat file launches PowerShell: powershell.exe -ExecutionPolicy Unrestricted -File InstallCU.ps1 I want my 7-zip self-extracting archive to run a PowerShell script after it extracts files.