Working with the Registry from the Command Line

PC Repair Tools

Advanced Registry Cleaner PC Diagnosis and Repair

Get Instant Access

If you want to work with the Registry from the command line, you can do so using the REG command. REG is run using the permissions of the current user and can be used to access the Registry on both local and remote systems. As with Registry Editor, you can work only with HKEY_LOCAL_MACHINE and HKEY_USERS on remote computers. These keys are, of course, used to build all the logical root keys used on a system, so you can in fact work with any area of the Registry on a remote computer.

REG has different subcommands for performing various Registry tasks. These commands include the following:

• REG ADD Adds a new subkey or value entry to the Registry

• REG COMPARE Compares Registry subkeys or value entries

• REG COPY Copies a Registry entry to a specified key path on a local or remote system

• REG DELETE Deletes a subkey or value entries from the Registry

• REG EXPORT Exports Registry data and writes it to a file

Note These files have the same format as files you export from Registry Editor. Typically, however, they are saved with the .hiv extension because double-clicking files with this extension won't start Registry Editor.

• REG IMPORT Imports Registry data and either creates new keys and value entries or overwrites existing keys and value entries

• REG LOAD Loads a Registry hive file

• REG QUERY Lists the value entries under a key and the names of subkeys (if any)

Was this article helpful?

0 0

Post a comment