See this webpage for the command line command for exporting Windows Registry entries. It says the valid root key names are HKLM, HKCU, HKCR, HKU, and HKCC. This makes it sound like I can't export everything with one command. But, Registry Editor is capable of exporting a single file. How do I do that with reg so that the exported files are identical to the ones that Registry Editor would make?
Add a comment
|
1 Answer
The command you're looking for is regedit /E %path%\to\export.reg.
I have confirmed this still works in Windows 11.
-
Note that this is simply a command-line interface for Regedit, so certainly should behave the same.DrMoishe Pippik– DrMoishe Pippik2024-10-15 14:13:18 +00:00Commented Oct 15, 2024 at 14:13
-
regdoesn't have an "export all" function, whereasregeditdoes. I'm not sure what other differences there are between these tools, but given what OP has presented, this appears to be the best answer.music2myear– music2myear2024-10-15 14:39:03 +00:00Commented Oct 15, 2024 at 14:39