Name

Registry Console Utility — \windows\system32\reg.exe

Synopsis

The Registry Console Utility performs all the functions of the Registry Editor, discussed in Chapter 5, but can be used from the command line. It also does a few things Registy Editor can't do, such as making a duplicate of a registry key or comparing two registry keys. To use the Registry Console Utility, type reg followed by one of the following commands and any applicable parameters:

Command

Description

query keyname [/v valuename | /ve] [/s]

Displays the data stored in a Registry value; omit /v valuename to display list of all the values in keyname (include /s to query all subkeys), or specify /ve to query the (Default) value. Keyname can also include the name of a remote computer, like this: query computer \ keyname.

add keyname [/v valuename | /ve] [/d data ] [/t typ ] [/s sep ] [/f]

Adds a new value. The keyname, valuename, /v, and /ve options are the same as with query, listed previously. The /d option assigns data to the new value; if omitted, the new value will be empty. Use /t to specify the data type for the value; the default is string (REG_SZ). Specify /f to overwrite existing values without prompting.

delete keyname [/v valuename | /ve | /va] [/f]

Deletes an existing value. All options are the same as with add, above. The /va parameter instructs the Registry Console Utility to delete all values in the specified key.

copy keyname1 keyname2 [/s] [/f]

Duplicates a key and all its ...

Get Windows XP Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.