@REGCREATE[HKEY...\subkey]: Create a new registry subkey. The parameter starts with the root key, which can be abbreviated:

 

Full root keyShort
HKEY_CLASSES_ROOTHKCR        
HKEY_CURRENT_USERHKCU        
HKEY_LOCAL_MACHINEHKLM        
HKEY_USERSHKU        
HKEY_CURRENT_CONFIGHKCC        

 

The remainder of the parameter (after the backslash) specifies the new subkey. The entire name must be quoted if it contains any white space or special characters, for example:

 

@REGCREATE["HKLM\Software\My Company\My Product\User"]

 

REGCREATE will create any intermediate keys necessary. For example, @REGCREATE[HKCU\key1\key2\key3] will create all three keys (if they do not already exist). REGCREATE returns 0 if the subkey was created or the Windows error number if an error occurred.

 

If you are running a 64-bit version of Windows, you can access the 64-bit registry instead of the 32-bit registry by appending "_64" to the HKEY name. For example:

 

     @regcreate["HKLM_64\Software\Company\Product\User"]

 

If the key name begins with \\machinename, @REGCREATE opens the registry on a remote machine. The remote registry service must be running on the remote machine, and you must have access and permissions. The HKEY parameter can be one of the following keys:

 

HKEY_LOCAL_MACHINE

HKEY_PERFORMANCE_DATA

HKEY_USERS

 

See also: @REGQUERY (read a value), @REGSET (write a value), and @REGSETENV (write and broadcast a value).