Get a System Registry value or enumerate all the names for the specified hkey. The value is stored in an environment variable called GETREG.
GETREG hkey [name] [/32 | /64]
hkey Specifies the path of the complete key. name Specifies the name of the value to retrieve. /32 Specifies the 32-bit registry hive (default). /64 Specifies the 64-bit registry hive.
Parameter hkey must begin with one of the following System Registry names :-
and all the sub-keys must be separated by backslashes (ie. ' \ '), For example :-
The following types of values may be retrieved using command GETREG :-
REG_SZ A null terminated string. REG_DWORD A 32-bit number. REG_DWORD_LITTLE_ENDIAN Same as REG_DWORD. REG_DWORD_BIG_ENDIAN A 32-bit number which is automatically converted to REG_DWORD format. REG_MULTI_SZ A list of null terminated strings. Each entry is separated with commas.
When parameter name is not specified then command GETREG will enumerate all the names contained in the specified hkey and create a list which contains all the names separated by commas.
The /32 and /64 switches are ignored when the WinOne® Command Prompt is running on a 32-bit version of Windows.
Most of the registry keys in 64-bit Windows are reflected between both registry hives, that is, most of the time, using either switch will yield the same result.