I have a bunch of INF files that I'm trying to work with. The problem I'm finding is that some of them are Unicode format and some are ANSI.


I can open and read in the file fine, but when I try to write out to it, my script crashes.

VB Code:
  1. Set outFile = FS.GetFile(FSFile.Path).OpenAsTextStream(2, -2) 'save INF in ANSI format to save space
  2. outFile.Writeline FileString 'write the modified text
  3. outFile.Close 'close file handle
  4. set OutFile = Nothing

If I write a null value to the file it seems to work fine.