If you launch a 32-bit instance of Powershell (%SystemRoot%\\syswow64\\WindowsPowerShell\\v1.0\\powershell.exe), then the registry provider only sees the limited 32-bit part
A slight variation of the answer from Milan is to host powershell using the C# program as per Bart De Smet's blog. Although that blog entry focusses on compiling against .NET 4.0, you can compile the same against .NET 3.5 as well. The result is a binary that is a PowerShell host that can access 64bit registry entires when invoked from a 32-bit process:
using System;
using System.Management.Automation.Runspaces;
using Microsoft.PowerShell;
namespace PSHost
{
class Program
{
static void Main(string[] args)
{
var config = RunspaceConfiguration.Create();
ConsoleShell.Start(
config,
"Windows PowerShell - Compiled for ANY CPU",
"",
args
);
}
}
}
The easiest way is to use this shortcut: C:\Windows\sysnative which is equivalent to C:\Windows\System32 -- but the key difference is that the process is launched as a 64-bit process. Therefore, the easiest way to access the 64-bit registry from a 32-bit powershell is to call reg.exe via C:\Windows\sysnative For example:
C:\Windows\sysnative\reg.exe QUERY HKLM\SOFTWARE\JavaSoft\JDK
source: https://stackoverflow.com/a/25103599
If, for some reason, you needed to access the 32-bit registry from a 64-bit command-line use C:\Windows\syswow64
C:\Windows\syswow64\reg.exe QUERY HKLM\SOFTWARE\JavaSoft