I'm currently running Windows 7 x64, and whenever I use a KScript via direct action or launching a .vbs dependency file to read or write to the registry, it's accessing the 32-bit registry hive.

For example, when I write a value to HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags, it's actually writing to:
HKLM\Software\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AppCompatFlags, I suppose because it's coming from a 32-bit app, or system account, or something.

When I launch the same script as a local admin, it properly accesses the 64-bit hive at the location specified.

Any thoughts, or suggestions for being able to access the proper registry location?
0 Comments   [ + ] Show 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.


Sounds like you've uncovered a bug. Have you contacted support@kace.com?
Answered 11/19/2009 by: cblake
Red Belt

Please log in to comment
What version of the KBOX and the agent are you on?

Have you tried explicitly writing the registry via the Launch Command function?
Answered 11/19/2009 by: jkatkace
Purple Belt

Please log in to comment
I've been through this...

for 32bit - call the 32bit cmd
for 64bit call the 64bit cmd

Answered 11/19/2009 by: dtuttle
Purple Belt

Please log in to comment
To support what Dale said here's a sample command line to update 64-bit keys

c:\windows\system32\cmd.exe /c regedit.exe /s ourfile.reg

Even if we know about issues however we would like to hear from affected customers -- your ticket will either report a new bug or register a vote against an existing bug which helps it get visibility within engineering.
Answered 11/20/2009 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
You might notice how the default Kbox script for defragmenting a computer is affected with this. You will have to send dos commands to the PC the same way.

Answered 11/20/2009 by: dtuttle
Purple Belt

Please log in to comment
Sorry for dropping that question and then staying away so long.
I figured out a workaround that I've been using since... including the 64-bit version of wscript.exe as a dependency with any scripts that need access to the 64-bit registry hive. Since the KBOX agent is a 32-bit app, all the defaults are set to 32-bit hives, and any scripts are launched with the 32-bit version of wscript.exe. So by including and forcing execution with the 64-bit wscript.exe, I have direct access to the 64-bit registry hive without having to significantly change my scripts or execution commands (except changing KBOX_SYS_DIR to KACE_DEPENDENCY_DIR when I specify where to launch wscript.exe from).
Answered 01/18/2010 by: mich3ael
Senior Yellow Belt

Please log in to comment
Since there hasn't been any activity on this post for a while, and since I came across the same issue when trying to query a 64-bit registry, I thought I would share my findings.

From this page:

I was able to craft a vbscript that queries both 32 and 64 bit registries, depending on the target platform.

Answered 08/11/2011 by: scottlutz
Orange Senior Belt

Please log in to comment
I'm an experienced Windows 7 and XP packager who has not worked with 64-bit Windows until now. When I read this article, I was astounded at the differences for scripters between 32- and 64-bit Windows:

I went on to take this class so I could understand the things I needed to know to work in 64-bit Windows using the KBOX 1000:

I highly recommend this class as the quickest way to understand the subtle differences in the operating environments. And remember that the KBOX agent, like the SCCM client, is a 32-bit executable! Sande
Answered 08/14/2011 by: snissen
Fourth Degree Green Belt

Please log in to comment
for this very reason i am in process of converting most of my scripts to powershell.
Answered 08/16/2011 by: sbequette
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity