Any attempt to execute vbs script generates a File Not Found Error

664 views Asked by At

The specific error is:

Script: \\dc\netlogon\folder\file.vbs

Line: 0

Char: 1

Error: File not found

Code: 800A0035

Source: Microsoft VBScript runtime error

The file is at the location specified. Furthermore, the same error is generated when double clicking on the file directly. And if the file is copied to the local drive and double clicked. And if invoked from the command line with wscript. It appears to occur when ANY vbs is launched via ANY method.

WScript is not disabled through the registry.

1

There are 1 answers

0
sapph On

It turns out I was including other scripts using code like:

With CreateObject("Scripting.FileSystemObject")
    executeGlobal .openTextFile(otherfile).readAll()
End With

This is the file that could not be found, but the parser choked - maybe because of the combination with the executeGlobal command - and gave me line 0 instead of the actual line.

So it turns out that line 0 probably references a combination of parsing error and inner reference file not found.