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.
5 Answers
Try this:
reg export Hkey_local_Machine\Software\mcafee C:\export.txtThis will export registry values according to windows REG format.
You can export a specific registry value to a text file with a setx commandCopy/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.regThe reg file can be opened for read/write, check here for format.
11reg export Hkey_local_Machine\Software\mcafee\key C:\export.txt && type C:\export.txt | findstr /i "key"
Sometimes one has to enclose the registry key in quotes in order to get down to individual items
REG EXPORT "HKCU\Software\SS64\xxxx" C:\MyReg.REG
1Enter this in at the DOS prompt :
1
reg export HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall test.txt && type test.txt | findstr /i "DisplayName" > list.txt | notepad list.txt