Link to home
Start Free TrialLog in
Avatar of mcnuttlaw
mcnuttlawFlag for United States of America

asked on

Export Reg Key in non-Hex format

Can anyone provide a script (batch or VBS) that will export a reg key in non-hex format?

I need to export the contents of a reg key but it exports the result in hex format.  I need to see the text equivalent.

Export entire tree:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

An excerpt exported as:

"My Music"=hex(2):25,55,53,45,52,50,52,4f,46,49,4c,45,25,5c,4d,75,73,69,63,00

Open in new window


Need it exported as the text (how it appears when viewed in the registry):

%USERPROFILE%\Music

Open in new window

Avatar of John
John
Flag of Canada image

As a registry export, you cannot do that.

You can use a hex converter after (many of these) or write a routine in VBA to do the conversion after export. There might be public domain VBA code to this but I do not know about the latter.
Avatar of Member_2_6404472
Member_2_6404472

Exporting the folder/key as a .txt you will have a readable list.
Avatar of mcnuttlaw

ASKER

Yup.  Already tried exporting directly to a  text file.  Same result - all hex.

reg export "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" C:\UserShellFolders.txt

Open in new window

Correct. You have to convert AFTER export.
ASKER CERTIFIED SOLUTION
Avatar of Member_2_6404472
Member_2_6404472

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That did the trick.  Thank you.
You are welcome.