Link to home
Start Free TrialLog in
Avatar of yan_sheila
yan_sheila

asked on

Export registry information into text file

Refer to the question:
https://www.experts-exchange.com/questions/21370972/Auto-export-registry-file.html

When I tried to read the odbc.txt with VBScript, it shows special words.
But if I copy the text file and paste it to a new text file, and the VBScript works.

Why this happens?
Avatar of oBdA
oBdA

That's probably because the file created by regedit is saved in Unicode format; when you copy and paste just the text into a new file, and save this in ANSI format, it works. Try to open the file created in notepad, choose "Save as", and save it in ANSI instead of Unicode. If this works, then you'll have to adjust the file handling in your VBS script.
Avatar of yan_sheila

ASKER

oBdA,

Thanks for your help.

With the answer you suggested last time:
regedit /e odbc.txt "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI"

can the text file be saved in ANSI format automatically?
or is there any way to change the Unicode to ANSI format automatically?

Sheila
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

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