Alternative to Regedit
by Warlock on Sep.22, 2008, under Scripting
Anyone who spends time on Windows quickly becomes familiar with regedit. It’s the fastest way to to get at a lot of configuration information and set specific application/OS flags.
When working from the command line, however, the reg command can be a better alternative for use in .BAT scripts. The reg command is specifically designed for scripting, and can do things like compare registry keys, retrieve key values, import/export .reg files, and much more. The help output of the command is listed below.
C:\Documents and Settings\Foo>reg /?
Console Registry Tool for Windows - version 3.0
Copyright (C) Microsoft Corp. 1981-2001. All rights reserved
REG Operation [Parameter List]
Operation [ QUERY | ADD | DELETE | COPY |
SAVE | LOAD | UNLOAD | RESTORE |
COMPARE | EXPORT | IMPORT ]
Return Code: (Except of REG COMPARE)
0 - Succussful
1 - Failed
For help on a specific operation type:
REG Operation /?
Examples:
REG QUERY /?
REG ADD /?
REG DELETE /?
REG COPY /?
REG SAVE /?
REG RESTORE /?
REG LOAD /?
REG UNLOAD /?
REG COMPARE /?
REG EXPORT /?
REG IMPORT /?