VBScript OpenTextFile Invalid Proedure call or argument -


so have read kinds of answers question , have implemented them best of understanding. after defining constants , checking ensure target file exists, still receiving error. has passing of optional parameters opentextfile - code run if pass file path , name. because target file in unicode, however, not work uses. more importantly, understand happening here after spending more few hours trying decipher issue. appreciate offered. thank you.

for reference, error receiving is:

unhandled exception @ line 17, column 3 in getnewversion.vbs

0x800a0005 - microsoft vbscript runtime error: invalid procedure call or argument

    option explicit      const forreading = 1     const tristatetrue = 1      dim strcomputer, objwmiservice, fso, ts, objshell, stempdir, spid, sfilepath, sfilename, colprocesslist, objprocess,listinfo, lineinfo      'create file system object     set fso = createobject("scripting.filesystemobject")      'locate temp directory     stempdir = fso.getspecialfolder(2)     stempdir = stempdir & "\dbupdateinfo.txt"      'ensure dbupdateinfo.txt exists     if fso.fileexists(stempdir)         set ts = fso.opentextfile(stempdir,forreading,false,tristatetrue)     ... 

the correct value tristatetrue -1.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -