开发者

Export registry in plain text format

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

开发者_StackOverflow[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.


Try it like this

START /W REGEDIT /E file.txt %REG_PATH%

By default it saves files with the .reg file extension. But it's a text file which can be executed by regedit and make changes in registry.

If you think this is not readable enough, try Import/Export registry sections as XML.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜