Monday, September 8, 2008

Regedit Command Line Options Syntax

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

No comments:

Post a Comment

Subscribe Now: Google

Followers

Total Pageviews

CO.CC:Free Domain