To read a registry key from the Windows command line, which command is used?

Study for the SANS560 GIAC Penetration Tester (GPEN) Test. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Multiple Choice

To read a registry key from the Windows command line, which command is used?

Explanation:
Reading registry values from the command line is done with the reg query tool. This command asks the registry for the data stored under a specific key and returns the values it contains. It’s the only option among the choices that is designed to retrieve information without modifying anything. For example, reg query "HKLM\Software\MyApp" will list all values under that key, and reg query "HKLM\Software\MyApp" /v InstallPath will show just the InstallPath value. Other options like reg add modify or create keys, reg delete removes them, and reg export saves the key to a .reg file. So, reg query is the appropriate command for reading.

Reading registry values from the command line is done with the reg query tool. This command asks the registry for the data stored under a specific key and returns the values it contains. It’s the only option among the choices that is designed to retrieve information without modifying anything.

For example, reg query "HKLM\Software\MyApp" will list all values under that key, and reg query "HKLM\Software\MyApp" /v InstallPath will show just the InstallPath value. Other options like reg add modify or create keys, reg delete removes them, and reg export saves the key to a .reg file. So, reg query is the appropriate command for reading.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy