Search notes:

Registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

Reading values with PowerShell

PowerShell allows to access the values under this key with
PS> echo [environment]::getEnvironmentVariable("PATH", "machine" )
PS> [environment]::setEnvironmentVariable("ANOTHER_VAR", "another value", "machine") 

PROCESSOR_ARCHITECTURE

PROCESSOR_ARCHITECTURE can be used to determine the bitness of the CPU. If it contains x86 (or even x86 Family), it's a 32 bit processor, if it contains 64 Family, it's a 64 bit processor.
Note, 32 bit applications running on 64 bit Windows (WOW64) seem to overwrite this variable in the process (not in the registry) with x86.

See also

Registry: environment variables

Index