Regedit Command Line Options SyntaxKeywords: regedit syntax command line
Regedit Command Line OptionsNote 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
/sUsing 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.
/eThis 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:userThis 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.regThis would be used in native dos to export the entire contents of system.dat and user.dat to newreg.dat
/cThis stands for create
Example:regedit /l:c:\windows\system.dat /r:c:\windows\user.dat /c c:\windows\newreg.regThis 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
/dThis 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