Reads a value from the registry.
RegRead,<HKEY>,<Section>,<Key>,<%Variable%>
Valid HKEY values
- HKLM
- HKCU
- HKCR
- HKEY_USERS
- HKEY_CURRENT_CONFIG
Details on the functions of each hive can be found at the Microsoft Site.
Valid key type values
- 0x0 - Empty key
- 0x1 - String - writes a text value
- 0x2 - Expanded String - will expand any variable value contained inside %%. (e.g. %temp%)
- 0x3 - Binary data - adds data in binary format. Each byte is specified by groups of two digits splitting each value with commas
- 0x4 - Dword - writes a numeric value
- 0x7 - Multiple NULL separated strings
RegRead,HKLM,Build\ControlSet001\Services\VgaSave\Device0,DefaultSettings.XResolution,%myXresolution%
In this example the variable %myXresolution% will store the value of the mentioned key