Home > Commands N-Z > Commands R

REGEDIT


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Import or export registry settings from a text (.REG) file.


Syntax

REGEDIT [/E] pathname ["RegPath"]

REGEDIT [/S] [/I] pathname

Start the regedit GUI:

REGEDIT


Parameters
pathname (Win95 NT4)
Path and filename.
"RegPath" (Win95 NT4)
Export part of the Registry (if omitted, all HKLM plus current user).

Switches
/E (Win95 NT4)
Export.
/I (Win95 NT4)
Import.
/S (Win95 NT4)
Silent Import.

Related

REGEDT32.EXE - Edit the registry including Security and Auditing Options.
REG - Read, Set or Delete registry keys and values.
SETX - Set environment variables permanently.


Notes

none.


Examples

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"=-
::::::::::::::::::::::::::::::

Errorlevels

none.


Availability
External
DOS
none
Windows
Win95
Windows NT
NT4

Last Updated: 2006/01/01
Direct corrections or suggestions to: Rick Lively 1