Scripting Question

How can I get Kace to input a 64bit registry Key?

01/23/2018 2029 views
Using k1000 v8
When I try to use the registry script builder, it inputs the key in:

I need it to go to:

When I try and call it through a batch script, it does the same thing. When i run the reg file manually it goes in the right place. I am at a loss here.

@echo off  
"MS Reg Entry.reg"

Reg file:
Windows Registry Editor Version 5.00


This is for the Spectre/Meltdown MS registry key entry. Any help would be great!

0 Comments   [ + ] Show comments


All Answers

You can use the reg.exe command and use the /reg:64 flag.
Answered 01/24/2018 by: chucksteel
Red Belt

  • When i run the script like this:
    @echo off
    reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat” /v cadca5fe-87d3-4b96-b7fb-a231484277cc /t REG_DWORD /d 0 /f /reg:64

    It hangs until i kill the process on the local box. It does the same thing when i run the command manually unless i have an elevated CMD window,
    • How is your script configured? Is it an online shell script or something else?
      • Online Kscript
      • Try using an online shell script. This is what my test script looks like:
        reg add "HKEY_LOCAL_MACHINE\Software" /v Test /t REG_SZ /d 32or64 /f /reg:64

        The script name is addreg.cmd.
    • You could also have the reg file as a dependency and do it with: reg import <name>.reg /reg:64. Having to use elevated command prompt, makes it sound like a UAC issue.

I've had good luck using this. The key is to use %windir%\sysnative

I believe something like this will work:

Answered 01/24/2018 by: five.
Second Degree Green Belt

  • this still redirects it to:
    • Odd. It works great in my environment. The local users are not admins and I must run all scripts with local admin credentials.
    • I know its kind of late, but hopefully can help others. The program name is not regedit.exe it was regedt.exe

      You can check it by launch cmd from %WINDIR%\SysWOW64\cmd.exe then cd into %WINDIR%\Sysnative

      Notes: Sysnative folder doesnt only available from 32bit process

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login