Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gibberish reading from a .reg file

Status
Not open for further replies.

rnpIII

Technical User
May 2, 2001
61
US
Hello,

I was reading from post number 855663 where Tsuji wrote an excellent script to change a reg file from one thing to another.

The problem I am having with it is reading an XP reg file I get gibberish until I open it in notepad save it as a txt file then resave it as a reg file.

Any ideas on how I can keep from having to do this so I can do this automated with less steps?

The code I have is the same as Tsuji's. Even tried writing to a whole different file.

rnpIII
 
Did you open the REG file with Unicode support ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I'm still fairly new to scripting. I know enough to do some damage but still have a lot to learn.
Is this something I can add to the
set ts = Ofso.opentextfile(regfilespec,1,True,TristateUseDefault)
line?
I have tried all of the different Tristate settings, what am I missing?

rnpIII
 
You may try this:
Set ts = Ofso_OpenTextFile(regfilespec, 1, False, TristateTrue)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
OH,

I got it! I was opening the file twice, and the second time it was opening without unicode support and using that instance. That's what I get for not paying attention.

Thank you for your help. I have learned something new now with the unicode support issue.

Thanks, PH.

rnpIII
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top