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.
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
Reg delete:
Used to delete a subkey or entry from the registry.
Example:
To delete the registry key prog1 and its all subkeys and values, type:
REG DELETE HKLM\Software\prog1.
Reg save:
Used to save specified subkeys, entries and values of the registry in a file and path given as parameters, if no path is given the file will be created in the current folder.example:
To save a copy of the Adobe software type:
REG SAVE HKLM\Software\Adobe Adobebackup.hiv
Reg Compare:
Used to compare specified registry subkeys or entries.syntax:
reg compare <KeyName1> <KeyName2>
The return values of this operation are:- 0: the comparison was successful and the result is identical.
- 1: the comparison failed.
- 2: the comparison was successful and differences were found.
The following are the symbols found in the result:
= KeyName1 data is equal to KeyName2 data.
< KeyName1 data is less than KeyName2 data.
> KeyName1 data is greater than KeyName2 data.
Reg copy:
Used to copy a specified registry entry to another specified registry entry either on the local computer or on a remote one.
example:
To copy all values under prog1 on the local computer to prog2 on remote computer PC2 type:
REG COPY HKLM\Software\prog1 \\PC2\HKLM\Software\prog2

No comments:
Post a Comment