My object is to export the Windows registry in txt format using a batch file.

If I use either of the following two lines from a batch file:

REG EXPORT C:\t.txt "HKEY_CURRENT_USER\Software"
REGEDIT /E C:\t.txt "HKEY_CURRENT_USER\Software"

I get output similar to this:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software]

[HKEY_CURRENT_USER\Software\Adobe]

I am surprised with the output of export using the REGEDIT GUI. If I select File->Export and change the "Save as type" to "Text Files", I get output similar to this:

Key Name:          HKEY_CURRENT_USER\Software
Class Name:        <NO CLASS>
Last Write Time:   1/5/2011 - 8:27 AM

Key Name:          HKEY_CURRENT_USER\Software\Adobe
Class Name:        <NO CLASS>
Last Write Time:   11/4/2010 - 12:01 PM

I think the second example shows the data in a more readable format. I want to achieve the same output using cmd or batch file.

Any help will be highly appreciated.

Edit
Report