@REGSET[HKEY...\subkey\value,type,data]: Write a value to the registry. REGSET supports keys of type REG_DWORD, REG_SZ,  REG_EXPAND_SZ, REG_MULTI_SZ, and REG_DWORD_LITTLE_ENDIAN. Type is the value type (REG_DWORD, REG_EXPAND_SZ, or REG_SZ). Data is the data to set. If this parameter is not supplied, @REGSET will remove the value. REGSET returns 0 if the value was written or the Windows error number if an error occurred.

 

If you're setting REG_MULTI_SZ values, separate each data argument with a comma.

 

If the key name begins with \\machinename, @REGSET 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_CLASSES_ROOT (or HKCR)

HKEY_CURRENT_CONFIG (or HKCC)

HKEY_CURRENT_USER (or HKCU)

HKEY_LOCAL_MACHINE (or HKLM)

HKEY_PERFORMANCE_DATA (or HKPD)

HKEY_USERS (or HKU)

 

Note: Remember to use quotes around any entry containing spaces or commas!

 

See @REGCREATE for information on the format of the key name. See also: @REGQUERY (read a value) and @REGSETENV (write and broadcast a value).

 

Example:

 

echo %@regset["HKCU\Software\JP Software\Take Command 28\MyVersion",REG_SZ,9999]

echo %@regquery["HKCU\Software\JP Software\Take Command 28\MyVersion"]

9999