Ara
Ara

Reputation: 409

Regedit: Find and export keys from command prompt

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

Upvotes: 8

Views: 24572

Answers (3)

T.Todua
T.Todua

Reputation: 56341

export key (with all sub-keys), from CMD (or RUN) i.e.:

regedit /e c:\output.reg "HKEY_LOCAL_MACHINE\System\YourLocation"

p.s. you should run this in CMD with ADMIN PRIVILEGES. for that, right click on START>Run CMD (as Admin)

Upvotes: 2

Abhineet
Abhineet

Reputation: 5389

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.

Upvotes: 12

durilka
durilka

Reputation: 1449

Powershell has registry iteration capabilities. Start here: http://technet.microsoft.com/en-us/library/ee176841.aspx

Upvotes: 6

Related Questions