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?
Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

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.
Answered 04/05/2012 by: PHKace
Blue Belt

  • 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.
  • Can you suggest how to import using regedit to the 64 bit hive?
    • I believe you can call: c:\windows\SysNative\regedit.exe /s test.reg
Please log in to comment

Answers

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.
Answered 04/04/2012 by: nchirtes
Senior White Belt

  • well, I have found the Registry changes seems to only affect the WOW64 hive,
  • 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...
Please log in to comment
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.
Answered 04/04/2012 by: dchristian
Red Belt

  • 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...
  • 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
  • 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.
  • exactly what I was trying and setting the key under Wow6432 is not effective.
Please log in to comment
Answer this question or Comment on this question for clarity