Ok I want to edit an offline registry entry from WinPE, if I am booted into the OS (32bit) the reg key is:


So I boot into WinPE and run my batch file to do these commands: (Tried on 32bit and 64bit)

Echo Loading Regestry Hive
reg Load HKLM\temphive H:\Windows\System32\config\SYSTEM
Echo Import the reg
reg add "HKLM\temphive\system\CurrentControlSet\Services\MountMgr" /v "NoAutoMount" /t REG_SZ /d 0x1
Reg IMPORT z:\Restore\NoAutoMount.reg
regedt32 /s z:\Restore\NoAutoMount.reg /reg:64
Echo Query the key
reg query HKLM\System\CurrentControlSet\Services\MountMgr /s
Echo Unload Registry Hive

reg unload HKLM\temphive

Registry file:

Windows Registry Editor Version 5.00

"Group"="System Bus Extender"


Now if I boot to the OS and set this registry entry it works, but if I try to update it ofline it does not. I know if I load


That's what I need to edit right? But if I do then boot into windows the registry key is not there. What am I doing wrong? and would it be different for 64bit over 32bit?


When you load a hive using reg load it loads that file into the key specified on the command line, in this case HKLM\temphive. So you should be adding the key to a descendant of HKLM\temphive, such as:

Reg ADD HKLM\temphive\system\CurrentControlSet\Services\MountMgr /v NoAutoMount /t REG_SZ /d 0x1

And the quote from the relevant help info (reg load /?):

REG LOAD HKLM\TempHive TempHive.hiv
  Loads the file TempHive.hiv to the Key HKLM\TempHive

| improve this answer | |
  • I tried that, did not work. =/ – Claude Garlick Nov 2 '14 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.