
Here is how to manage the registry using the command line (REG command). These mainupalitions are useful when you are facing an infection that prevents access to the registry or when you want to create a batch that modifies the registry.
Opening a command prompt
To begin, you must run the command prompt with the highest privileges:
- XP:
Start Menu> Run
Type cmd and validate
- Under Vista:
- Start Menu> All Programs> Accessories
- Right-click Command Prompt> Run as administrator
- To get more information about the REG command.
- Just add /? after the command.
- Examples:
*
- REG /?
- REG ADD /?
- REG COPY /?
Adding an Item
Add a Key
REG ADD [location of the key][name of the new key]
Add a value
REG ADD [location of the new value]/V[value name]/T [value type]/D [value data]
The /T is to specify the type of value to add. There may be six types of values:
- REG_SZ
- REG_MULTI_SZ
- REG_EXPAND_SZ
- REG_DWORD
- REG_BINARY
- REG_NONE
Add default value
REG ADD [location of the new value]/VE/D [data value]
Deleting an Item
Delete a key
REG DELETE [key name]
Removes the selected key and all sub keys and values it contains.
Remove a value
REG DELETE [key name]/V[value name]
Delete the default value
REG DELETE [key name]/VE

No comments:
Post a Comment