@REGQUERY[HKEY...\subkey\value]: Read a value from the registry. REGQUERY supports keys of type REG_DWORD, REG_QWORD, REG_EXPAND_SZ, REG_SZ, REG_DWORD_LITTLE_ENDIAN , and REG_QWORD_LITTLE_ENDIAN. If the key is of type REG_EXPAND_SZ, the value is returned without further expansion. If the value name does not exist, the function returns -1. If the value name is not supplied, REGQUERY returns the unnamed value for the specified key (the first value with a NULL name). To retrieve an unnamed value, add a trailing \ to the name.
If the key name begins with \\machinename, @REGQUERY 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 (create a subkey) for information on the format of the key name. See also: @REGSET (write a value) and @REGSETENV (write and broadcast a value).
Example:
echo %@regquery["HKCU\Software\JP Software\Take Command 28\Version"]
28.0.1.0