To know the contents of a particular registry key or a particular value:
REG QUERY KeyName [/v ValueName | /ve] [/s]
/v Specifies the registry value name that is to be queried.
/ve Runs a query for value names that are empty.
/s Specifies to query all subkeys and value names recursively. Example to query the value of menushowdelay at HKCU/control panel/desktop
reg query "hkcu/control panel/desktop" /v menushowdelay
To add new registry keys:
REG ADD KeyName [/v ValueName | /ve]
[/t Type]
[/d Data] [/f]
/t
Specifies the type for the registry entry which must be one of the following: REG_SZ REG_MULTI_SZ REG_DWORD_BIG_ENDIAN REG_DWORD REG_BINARY REG_DWORD_LITTLE_ENDIAN REG_LINK REG_FULL_RESOURCE_DESCRIPTOR REG_EXPAND_SZ
/d Specifies the data for the new registry entry.
/f Adds the registry entry without prompting for confirmation.
Example to change the value of menushowdelay to 0:
reg add "hkcu/control panel/desktop" /v menushowdelay /t REG_SZ /d 0
To delete registry keys:
REG DELETE KeyName [/v ValueName | /ve | /va] [/f]
/va
Deletes all entries under the specified subkey. Subkeys under the specified subkey are not deleted.
to export and import registry keys:
To export: REG EXPORT KeyName FileName
To import:
REG IMPORT FileName
No comments:
Post a Comment