Regedit: Find and export keys from command prompt

Ara picture Ara · Mar 14, 2013 · Viewed 22.6k times · Source

I'm wondering is there any option via command line to search for a string and export all found keys in Windows registry?

Answer

Abhineet picture Abhineet · Mar 14, 2013

Ex:: If you want to check whether "HKLM\software\etc" key exists.

reg.exe query "HKLM\Software\etc" will return all the subkeys and values in command prompt if found or an error if not found.

ALso, you can directly do

reg.exe export "HKLM\software\etc" "C:\etc.reg"

This will export the registry key and subkeys if found otherwise error if not found.