How to set 64-bit registry key value, not Wow6432Node

ssg31415926's picture

We're installing PowerShell which, on Server x64, installs both 32-bit and 64-bit versions. On 32-bit Windows, we set a value on this key: HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell using a .reg file.

Running the .reg file from the desktop on the x64 machine puts the value in the same key.

In our package, we set a registry value using the same .reg file that we used on 32-bit Windows but it ended up under the Wow6432Node node: HKLM\SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell.

This only applies to the 32-bit version. We want to set the value on the original key, as well, so that the 64-bit version also gets the setting.

This is the first time we're installing on x64. Can anyone suggest how we can set both registry keys?

cnimmer's picture

Try Regedit Import?

I assume you're using Wise Package Studio, right? If you're using WPS to create the key and it keeps going under the Wow6432Node key, maybe you could call the registry file with regedit? Export the .reg file where you want it, then call it in WPS by executing: regedit.exe /s settings.reg. Maybe WPS 7 is 64bit unaware...not sure though.

Coppage's picture

Comand line registry editing

I'm not sure how you would do thing from within a job, since I'm really new to Altiris, but you can modify the registry using the REG ADD command.

Example:

REG ADD "\\Servername\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V ANT_HOME /t REG_SZ /d "c:\apache-ant_1.7.1" /f

Do:

REG /? 

to see other options.

Siddram's picture

32-bit programs and 64-bit

32-bit programs and 64-bit programs that are running on an x64-based version of Windows operate in different modes and use the following sections in the registry:

Native mode 64-bit programs run in Native mode and access keys and values that are stored in the following registry sub key:
HKEY_LOCAL_MACHINE\Software

32-bit programs run in WOW64 mode and access keys and values that are stored in the following registry sub key:
HKEY_LOCAL_MACHINE\Software\WOW6432node

You should first Check is it 32-bit or 64-bit versions, accordingly add the respective registry entries by VBscript/Wise script(as per your convenience).

gsprague's picture

Similar

I have a similar issue where the software appears to know if its running on a 32 or 64 bit OS.
When I push the package to 32bit Vista, everything works fine, on 64bit Vista (or server08), it automatically places the keys in the HKLM\software\wow6432node\ section.
I have not yet found a way to write to both areas of the registry, so if one is found, I would be very thankfull.

Lindsay37's picture

wow6432node fiasco in vista

I'm running PC Tools Desktop Maestro. I've used it in previous versions of Windows and love it. It's up to just over 5500 errors regarding the wow6432node entries. I got into the registry and can see lots of perfectly good programs including two I installed.

What's going on? It takes 1-2 hours on a 6GB RAM HP speedo to scan what should take a couple of minutes!

Thanks