How To Export WinNT Registry Entries from a Command Prompt

This article was previously published under Q168589
The contents of the Windows NT 4.0 or Windows 2000 registry can be exported to atext file without starting Registry Editor.

Additionally, a specific registry key can be designated for export withonly the contents being exported.
To prevent dialog boxes from appearing when you start Registry Editor, youcan add a switch to Regedit.exe at a command prompt to export all or partof the Windows NT or Windows 2000 registry. This makes it a transparent operation and nouser input is required.

The syntax for Regedit.exe is documented in the "Windows 95 Resource Kit"on page 1025.

The additional parameters for Regedit.exe are:
REGEDIT /e File_name.reg regkey_name

File_name.reg - Specifies the text file name to which the Registry should be exported.

Regkey_name - Optionally specifies the key to be exported.


To transparently export the registry to a text file, click Start, click Run, type regedit /e c:\output.txt, and then click OK.

To export a registry key, add the specific location to the commandsuch as:
regedit /e c:\output.reg

Export registry DOS

Article ID: 168589 - Last Review: 02/23/2007 22:02:07 - Revision: 2.2

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 4.0 Standard Edition
  • kbenv kbhowto KB168589