Friday, March 9, 2018

operations

Editing Windows registry with command line

Editing-Windows-registry-with-command-line
We saw in the article Windows registry a graphical tool (regedit.exe) integrated in Windows used to edit the registry,there is however another command line tool that offers almost all the tasks offered by regedit.exe, it is sometimes faster to edit the registry using the command line tool than using the graphical one, besides you can use the commands in scripting that can be used for automated tasks either on the local or remote computer.

Reg.exe:

The reg.exe is the command line tool that is used to deal with the registry, to use it open a command line window by clicking on start and type cmd then right click cmd and click run as administrator, this will run cmd with elevated privileges.
run-command-line-as-administrator
Reg.exe is used with operations that perform different tasks, those operations are:

Reg Query:

Used to query the registry about the subkeys and entries located under a specified subkey in the registry.
example:
To display the key, value, and data for exact and case sensitive matches of SYSTEM under the HKLM root of data type REG_SZ, type:
REG QUERY HKLM /f SYSTEM /t REG_SZ /c /e

Reg add:

Used to add new subkey or entry to the registry.
example:
To add a registry entry to HKLM\Software\Adobe with a value named Data of type REG_BINARY and data of ac230fb, type:
REG ADD HKLM\Software\Adobe /v Data /t REG_BINARY /d ac230fb

No comments:

Post a Comment