/build/static/layout/Breadcrumb_cap_w.png

Incorrect registry placement on 64bit system

I apologize if this is not in the correct section of the forum.

I am attempting to install RealVNC Enterprise 4.6.3 using an "Online KScript"
I know very little about scriping, but using the KScript has not been to bad until now.

The first task:
Installation, license push, and key generation works perfectly on both the 32bit and 64bit PCs.

The second task:
It iss supposed to push the configuration settings by setting/creating various registry entrys. This works fine on 32bit computers. I have found out the problem is the 32bit Kace Agent is placing the registry keys on the 64bit machines within the 32bit tree (Wow3254Node).

My second task is setup to "Verify" the WinVNC4 service exists, then on success to do the following:
1. Set “HKLM\SOFTWARE\RealVNC\WinVNC4”.Edit
2. Set “HKLM\SOFTWARE\RealVNC\WinVNC4!UpdateMethod” to “0x00000002”.Edit
3. Set “HKLM\SOFTWARE\RealVNC\WinVNC4!ConnNotifyTimeout” to “0x00000000”.Edit
4. Set “HKLM\SOFTWARE\RealVNC\WinVNC4!UserPasswdVerifier” to “VncAuth”.Edit
5. Set “HKLM\SOFTWARE\RealVNC\WinVNC4!Password” to “hex:xxxxxx”
6. Set “HKLM\SOFTWARE\RealVNC\WinVNC4!DisableTrayIcon” to “0x00000002”.Edit
7. Set “HKLM\SOFTWARE\RealVNC\WinVNC4!GuestUserName” to “none”.Edit
8. Set “HKLM\SOFTWARE\RealVNC\WinVNC4!AllowHTTP” to “0x00000000”.Edit
9. Set “HKLM\SOFTWARE\RealVNC\WinVNC4!BlacklistTimeout” to “0x0000001e”.

Is there a way, using the KScripting, to force them into the 64bit registry when it is run on a 64bit machine?

Thanks in advance for any assistance.

0 Comments   [ + ] Show comments

Answers (4)

Posted by: scriptingninja 12 years ago
5th Degree Black Belt
1
The installer itself is a 32bit installer correct? If so that is why it is going into Wow6432Node not because K1000 is choosing to put it there.
Posted by: roey 12 years ago
White Belt
0
To force a kscript or custom inventory rule to reference the 64-bit registry, append a 64 to the hive (HKEY) name. Specifically, HKLM should become HKLM64, HKCU should become HKCU64, etc. For example: "HKLM64\SOFTWARE\RealVNC\WinVNC4".
Posted by: mikkojarvinen 12 years ago
Senior Yellow Belt
0
Is there a way, using the KScripting, to force them into the 64bit registry when it is run on a 64bit machine?
The problem is that 32-bit KACE Agent is redirected to the 32-bit registry hive (Wow6432Node) on 64-bit Windows (WOW64 Registry Redirection). You'll need some way to "break through" or circumvent the WOW64 barrier.

You could possibly use [font="courier new"]reg.exe and [font="courier new"]/reg: switch. On 64-bit Windows it works on both 32- and 64-bit versions of reg.exe and directs the operation to the desired registry part - which is 64-bit in your case.
Try to run these commands in 64-bit Command Promt ([font="courier new"]%systemroot%\system32\cmd.exe) and 32-bit Command Prompt ([font="courier new"]%systemroot%\SysWOW64\cmd.exe) and you'll get the idea.
[font="courier new"]reg.exe query HKLM\SOFTWARE\ /reg:64
[font="courier new"]reg.exe query HKLM\SOFTWARE\ /reg:32
Unfortunately 32-bit Windows XP's reg.exe doesn't understand the /reg:-switch and throws an error. On natively 32-bit Windowses you should actually run the command without /reg:-switch. You'll need a mechanism to detect whether you are running on a 32- or 64-bit Windows - and remember that you are probably doing the detection through KACE Agent which is 32-bit application. These two environent variables may come in handy:
[/align][/align]Native x64: (64-bit Windows)
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_ARCHITEW6432=
WOW64: (32-environment on 64-bit Windows)
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=AMD64
Native x86: (32-bit Windows)
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=

You can also get around the WOW64 Registry Redirection using WMI (and VBScript):
http://msdn.microsoft.com/en-us/library/windows/desktop/aa393067%28v=vs.85%29.aspx

Hope you can sort it out some way.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ