Skip to content

RegUnLoadHives

Homes32 edited this page May 14, 2022 · 2 revisions

RegUnloadHives

UnMount Source and Build registry hives.

After running this command the following registry hives mounted under HKLM will be unloaded:

Argument Description
Tmp_Default The WinPE DEFAULT (HKCU) hive.
Tmp_Drivers The WinPE DRIVERS hive.
Tmp_Software The WinPE SOFTWARE (HKLM\Software) hive.
Tmp_System The WinPE SYSTEM (HKLM\System) hive.
Tmp_Install_Default The source Install.wim DEFAULT (HKCU) hive.
Tmp_Install_Drivers The sourceInstall.wim DRIVERS hive.
Tmp_Install_Software The sourceInstall.wim SOFTWARE (HKLM\Software) hive.
Tmp_Install_System The source Install.wim SYSTEM (HKLM\System) hive.

Syntax

RegUnLoadHives[,FORCE][,HKEY=<HKEY>][,Target=<Dir>]

Arguments

Argument Description
FORCE Force unloading of all non-system hives.
HKEY= Unload hives from this root key. (HKLM, HKU)
Target= Unload hives from this directory.

Return Codes

Variable Description
#r If FORCE is specified the return code will be one of:
0 - All registry hives unloaded successfully.
1 - Warning: Not all registry hives could be unloaded!
2 - No loaded registry hives were found.

You must handle ExitCode. The script will not Exit/Halt.

Remarks

None.

Related

RegLoadHives

Examples

Example 1


Echo,"Configuring %ScriptTitle%..."
RegLoadHives

RegWrite,HKLM,0x4,"Tmp_Default\Software\mySoft","Language","en-US"
RegWrite,HKLM,0x1,"Tmp_Software\mySoft","InstallDir","C:\mySoft"

RegUnloadHives