Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I export specific value from the registry to a text file using the command line?

For example, I want to export Hkey_local_Machine\Software\mcafee to a text file in C:. I just need the key – that's it.

I tried with reg export – it's giving everything, but I just require the key of the partiular thing.

share|improve this question
It's kind of hard to follow what you actually want to export. What do you mean by reg export "giving everything"? Did you specify the exact key you wanted to export? – Ƭᴇcʜιᴇ007 May 14 '13 at 19:00

Try this:

reg export Hkey_local_Machine\Software\mcafee C:\export.txt

This will export registry values according to windows REG format.

share|improve this answer

reg export Hkey_local_Machine\Software\mcafee\key C:\export.txt && type C:\export.txt | findstr /i "key"

share|improve this answer

You can export a specific registry value to a text file with a setx command Copy/pasta from there:

SetX _TZone /k HKLM\System\CurrentControlSet\Control\TimeZoneInformation\StandardName
>Tzone.txt echo %_TZone%

The alternative to above is to write it to a reg file using the methods in the above answers:

REG EXPORT HKLM\System\CurrentControlSet\Control\TimeZoneInformation\StandardName C:\Windows\Temp\Tzone.reg

The reg file can be opened for read/write, check here for format.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .