/build/static/layout/Breadcrumb_cap_w.png

modify/add registry settings in Win 7 x64 using KBOX 5.3.53177

On Win XP I used to be able to to modify or add HKLM registry directly with a KBOX bat file Reg Add or Managed Install. When we migration to Windows 7 x64 this became more difficult. Registry changes seems to only affect the WOW64 hive, not where they would be effective for the logged on user. Has anyone got an easy way to do reg changes on x64 with KBOX?

0 Comments   [ + ] Show comments

Answers (4)

Answer Summary:
Posted by: PHKace 12 years ago
Blue Belt
3
To access the 64-bit hive, use HKLM64 instead of HKLM.

For example:
Create a script task - Set a registry value...
Key: HKLM64\SOFTWARE\TEST
Name: TEST
Type: REG_SZ
Data: 1

You will see the update in the 64-bit hive instead of Wow6432Node.

Comments:
  • What I had done in the past is upload a reg file and then import with this command line regedit.exe /s test.reg as a post install task on K2000 image. - mlathrop 12 years ago
  • Can you suggest how to import using regedit to the 64 bit hive? - mlathrop 12 years ago
    • I believe you can call: c:\windows\SysNative\regedit.exe /s test.reg - PHKace 12 years ago
  • For those of us not using script tasks for our software deployments, this is not a working solution. Certain software developers have their install check for registry entries specifically in the native HKLM\SOFTWARE location. Using REG ADD in a batch script to satisfy this works except for when KBOX Managed Installation is asked to run that batch script. KBOX changes the registry location to HKLM\SOFTWARE\WOW6432Node which means the software install fails.

    I have tried both REG ADD HKLM64\SOFTWARE and HKLMNAT\SOFTWARE, which is what we are instructed to use for REG QUERY, but both of these fail to do anything at all when using REG ADD. If I run the script from other management systems there is no issue with this, so it is not MS, it is a KBOX thing. Does anyone have a working method to include a native registry REG ADD command within a batch script running from a KBOX Managed Installation (not kscript)?

    I don't mind another work-around, but I need something I can script in a KBOX Managed Installation, not kscript. - WayneMan 4 years ago
Posted by: WayneMan 4 years ago
White Belt
0

I commented on this earlier today. Since posting I have been working on this and have a working solution. It is embarrassingly simple.

All I needed to add to the REG ADD command was /reg:64 and KBOX was then able to put the registry entry in HKLM\SOFTWARE. Here is the command that is working for me. The /reg:64 switch should work for a reg import as well.

REG ADD HKLM\SOFTWARE\YourRegEntry /reg:64 /F

Hopefully this helps some of you who haven't found this already.

Posted by: nchirtes 12 years ago
Senior White Belt
0
Changes for HKLM are done the same on Win 7 x64.
Create a new script,
Attach the exported key file xxxx.reg as a dependancy.
On success run a batch file with the batch file containing the followin line:
"regedit /s xxxx.reg"
Deploy.

Comments:
  • well, I have found the Registry changes seems to only affect the WOW64 hive, - mlathrop 12 years ago
  • I am not sure I understand what you mean by that.
    Whatever key you export and put into your .reg file will get modified on target computer.
    Ex. I used the following content in .reg file to disable Reader Browser integration:
    "
    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\10.0\Originals]

    "bBrowserIntegration"=dword:00000000
    "
    This was a HKCU key, so I had to run it while users are logged on, but for HKLM it's same idea...
    Create the key you need, export it, then push it out... - nchirtes 12 years ago
Posted by: dchristian 12 years ago
Red Belt
0
Its the MS wow redirection that's tripping you up.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa384232(v=vs.85).aspx

What are you trying to do exactly? Usually 64 bit programs should be redirected to wow6432.

Comments:
  • I think Christian has a good point, You might do some reading on Registry Redirector... Some keys would get redirected there as well, but that does not mean that those keys do not work. It all depends on the type of application you try to control.. is it a 32 or 64 bit one.

    Best yet, let us know what exactlly are you trying to do here, as Christian mentioned... - nchirtes 12 years ago
  • The critcal thing I was trying to do awhile back was to suppress the Windows Update for IE9 by changing a key. Other things are simple as setting the default IE start page. On XP I was able to do reg edits just fine under the agent, however under Win 7 I can't seem to do regedit under the agent credentials - mlathrop 12 years ago
  • I was trying to do exactly the same thing - prevent IE9 from auto-installing by updating the registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Setup\9.0\DoNotAllowIE90 to a value of 1.

    If I manually run Microsoft's tool (which is really just a .cmd file), it will set the value in the exact location I listed, above. If I try to apply the change via the K1000, it instead sets the value under the Wow6432Node:
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Setup\9.0\DoNotAllowIE90.

    I read the MS article on registry redirection, and it seems to me that having this setting in the wrong section of the registry will render it ineffective, though I haven't tested it, yet.

    In the end, I used PHKace's suggestion of using HKLM64\... in my script, and that set the value in the expected location.

    I'd be curious to know if setting the value in Wow6432Node would also disable auto-installation of IE9 on a 64 bit Win 7 machine. - palmerEldritch 12 years ago
  • exactly what I was trying and setting the key under Wow6432 is not effective. - mlathrop 12 years ago

Don't be a Stranger!

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

Sign up! or login

Share

 
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