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:
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   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


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)
WOW64: (32-environment on 64-bit Windows)
Native x86: (32-bit Windows)

You can also get around the WOW64 Registry Redirection using WMI (and VBScript):

Hope you can sort it out some way.
Answered 01/13/2012 by: mikkojarvinen
Senior Yellow Belt

Please log in to comment
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".
Answered 01/31/2012 by: roey
White Belt

Please log in to comment
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.
Answered 01/31/2012 by: scriptingninja
Fifth Degree Black Belt

Please log in to comment
Answered 04/15/2012 by: piyushnasa
Red Belt

Please log in to comment