Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command for exporting registry

Status
Not open for further replies.

lidehall

Programmer
Feb 11, 2004
34
SE
Hi,
does anybody know the command for exporting the registry in a .bat file. I'm using it for a scheduled task.
E.g AT regedit /export C:\...\...
Many thanks

L.H DC
 
Code:
regedit /e ExportFile.txt "PathToExport"

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Thank you!
I tried that one but when I run the script the command window prints with the text ">regedit /e ExportFile.txt e:Backup\registry\"
It still prints.
Is it a natural behaviour or should the export time be over in a second or so?
Regards



L.H DC
 
Ok, I was not clear enough. The 'ExportFile.txt should be replaced with the name and path of the file that you want the registry to be exported to. The 'PathToExport' should be replaced with the path to the key you want to export (i.e. "HKEY_LOCAL_MACHINE\Software\Microsoft"). If you want to export the entire registry to a file names RegExport.txt in the directory e:\backup\registry, the command would be:
Regedit /e e:\backup\registry\RegExport.txt

If you only wanted to export HKLM\Software, the command would be:
Regedit /e e:\backup\registry\RegExport.txt "HKEY_LOCAL_MACHINE\Software"

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Sorry, its been a rough day at work.
Thank you for your kindness.
Regards

L.H DC
 
No problem. Glad I could help.

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top