I used reg.exe to set the key but even though it returned success the key wasn’t altered.
As I suspected the key was written to the Wow6432Node. In the help I couldn’t find any switch to force reg.exe to use the 64-bit view.
On a 64 bit machine this is not a problem since both 32- and 64 bit versions of reg.exe exists. The 32 bit version of reg.exe defaults to the 32 bit view and the 64 bit version defaults to the 64 bit view.
But luckily reg.exe has a switch (that is not listed in the help) to force the View:
- /reg:64 forces reg.exe to use the 64 bit view
- /reg:32 forces reg.exe to use the 32 bit view
Reg Query "\\REMKOLAPTOP\HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v RegisteredOwner /reg:32 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion RegisteredOwner REG_SZ Microsoft Reg Query "\\REMKOLAPTOP\HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v RegisteredOwner /reg:64 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion RegisteredOwner REG_SZ rweijnen
Note: Windows XP, 2003, Vista and Server 2008 require hotfix kb948698.
Was once an enthusiastic PepperByte employee but is now working elsewhere. His blogs are still valuable to us and we hope to you too.