How to look up registry values from Command Prompt on Windows 10
The Registry Editor is a built-in tool on Windows 10 that you can use to view registry entries in a user-friendly layout. You still need to know what you’re looking for, and how to make changes, as well as what changes to make but the app provides users with a fairly decent GUI to navigate everything.
Since the registry is such a critical part of Windows 10, it stands to reason that you’d need admin rights to change anything in it. If you have limited rights on a Windows 10 system, and you need to look up registry values, you can always use the Command Prompt.
Look up registry values from Command Prompt
In order to look up a registry value, you must know which key it is under. You can search the registry from the Command Prompt but doing so is going to be extremely tedious. It is best to have the complete path to the value or key that you want to look up, and the exact name of the value that you want to look up.
A path to a key in the registry looks like this;
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion
A value is a numeric name with no spaces in it, like this;
InstallDate
If you’re only interested in looking up a key, you will not need the name of a value. When you look up a key, you basically look up what values and keys exist under it.
Look up key
If you want to look up a key, run the following command. Make sure the path to the key is enclosed in double-quotes.
Syntax
Reg Query "Path to key"
Example
Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
The output of this command can be rather long since a key can have lots of sub-keys. This command will only return a list of keys under the one you’ve specified.
If you’d like to look up both the keys and the values under a specific key, and also include all the values under the sub-keys, add the /s switch. Be prepared for an even larger output.
Example
Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /s
Look up value
If you only need to look up one value in the registry, you can use the /v switch and follow it up with the name of the value you want to look up.
Syntax
Reg Query "Path to key" /v NameOfValue
Example
Reg Query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v InstallDate
The output will tell you what type of value it is e.g., DWORD, String value, Binary value, etc, and also what is set in the value data box.
If you’re interested in learning about what other switches can be used with the Reg Query command, read the documentation that is available from Microsoft.
Is it possible to set/change registry values from the command line?