Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

LoadHive( )

Action: Creates a subkey under HKEY_USERS or HKEY_LOCAL_MACHINE and stores registration information from a specified file into that subkey. This registration information is in the form of a hive. A hive is a discrete body of keys, subkeys, and values that is rooted at the top of the registry hierarchy. A hive is backed by a single file and .LOG file.
 
Syntax: LOADHIVE ("key", "file name")
 
Parameters: Key

The key you want to load the information in. This key must reside under HKEY_LOCAL_MACHINE or HKEY_USERS.

File name

Identifies the file you want to load the information from. This file specified needs to be a legal registry hive (created by SAVEKEY, or from REGEDT32.EXE).

Remarks: On Windows NT, using LOADHIVE requires Backup and Restore privileges.
 
Returns:
0 Hive loaded
Error code Function failed
 
See Also: LoadKey( ), SaveKey( ), UnloadHive( )
 
Example:

$ReturnCode = LoadHive("HKEY_USERS\EZReg", "c:\temp\tst.reg")
If $ReturnCode = 0
  ? "Hive loaded...."
Endif