Skip navigation

JSI Tip 1087. How can I use Regedit to export a registry key from the command line?

Regedit support a /e command line switch.

To export and .Reg file from the command line or batch script, use the following syntax:

regedit /e <Drive:>\Folder\FileName.reg KeyName

Example: To export HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer, use:

regedit /e c:\zzz\reg.reg "HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer"

NOTE: Quote marks are required due to spaces in the key name.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish