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

KiXtart 2001 Manual


Action: Loads a registry key (including its subkeys and values) from a file.
Syntax: LOADKEY ("subkey", "file name")


The subkey in which you want to load the information. This subkey must exist for the call to be successful.

File name

Identifies the file from which to import the information. This file must be a valid registry hive file created by using the SAVEKEY function, or by using a registry editor.

Remarks: On Windows NT, using LOADKEY requires Backup and Restore privileges.
Caution: LOADKEY imports information into the registry and overwrites any existing subkey. This replaces all the subkeys and values that may already exist in the subkey you are loading. Any existing values and subkeys are lost.
0 Subkey loaded
Error code Function failed  
See Also: LoadHive( ), SaveKey( ), UnloadHive( )

$ReturnCode = LoadKey("HKEY_CURRENT_USER\EZReg", "c:\temp\tst.reg")
If $ReturnCode = 0
  ? "Key loaded...."