Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase

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


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.


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


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


This stands for create


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


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


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

Article ID:   W15277