Import or export registry settings from a text (.REG) file.
REGEDIT [/E] pathname ["RegPath"]
Start the regedit GUI:
REGEDIT
REGEDT32.EXE -
Edit the registry including Security and Auditing Options.
REG - Read, Set or Delete registry keys and values.
SETX - Set environment variables permanently.
none.
Frank found that to export a registry key, add the specific location to the command such as:
REGEDIT /E c:\out.reg HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Id
To delete a registry key place a hyphen as the first character to the right of the bracket:
REGEDIT /I c:\delete.reg C:\DELETE.REG contains: :::::::::::::::::::::::::::::: regedit 4 [-HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\EventLog\Application\Time Serv] ::::::::::::::::::::::::::::::
Klaus Lofflad spent 3 days figuring how to delete an entry from a key, this is his solution:
REGEDIT /I c:\delete.reg C:\DELETE.REG contains: :::::::::::::::::::::::::::::: regedit 4 [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources] "MyODBC_DSN"=- ::::::::::::::::::::::::::::::
none.