WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Registry
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Regedit Command Line Options Syntax

Keywords: 	 regedit syntax command line

Regedit Command Line Options

Note that some of these options may not apply to all Windows operating systems.

The syntax to follow is:

regedit.exe [options] [filename] 
For example: regedit.exe /s myfile.reg

/s

Using this option(as in the example above) imports the reg file without any confirmation. It hides the dialog box stating that your file has been successfuly imported into the registry.

/e

This option is used to export the registry or part of it to a file. example: regedit.exe /e myfile.reg HKEY_LOCAL_MACHINE\SOFTWARE

This would export the entire Software key to myfile.reg.

Note that it doesn't have to be a reg file you export to - it can be a text or document file, as well.

/L:system /R:user

This is to specify the location of the system.dat and user.dat files to use

Example:

regedit /l:c:\windows\system.dat /r:c:\windows\user.dat /e c:\windows\newreg.reg
This would be used in native dos to export the entire contents of system.dat and user.dat to newreg.dat

/c

This stands for create

Example:

regedit /l:c:\windows\system.dat /r:c:\windows\user.dat /c c:\windows\newreg.reg 
This would create a new registry from the contents of "c:\windows\newreg.reg"and is normally used in conjunction with the previous example. Note - your current system.dat and user.dat are destroyed during this process. New dat files are built from the contents of newreg.reg

/d

This is to specify a key to delete and is available only in Win98\Me

Example:

regedit /l:c:\windows\system.dat /r:c:\windows\user.dat /d HKEY_LOCAL_MACHINE\SOFTWARE\McAfee 

Article ID:   W15277
File Created: 2002:09:05:13:50:58
Last Updated: 2002:09:05:13:50:58