Hi,
I'm getting the "Invalid procedure call or argument" error when trying to
write files what appears to be when the file is over a certain size.
I have two versions of the script. One is running in an .asp page and the
other in a .vbs file. It is only breaking when executing via wsh.
Both versions run under Windows 2003 (ie IIS6, WSH v5.6)
Any ideas on why the script breaks when writing files over a certain size in
vbscript? Thanks for any input!
--------------------------------------------------
Snippet of the code in question....
Sub WriteFile(strData, strFileName)
Dim objFileSystem, objText
If Not strFileName = "" Then
Set objFileSystem = CreateObject("Scripting.FileSystemObject")
Set objText = objFileSystem.CreateTextFile(strFileName, True)
objText.Write strData '<--***code breaking here***
objText.Close
Set objText = Nothing
Set objFileSystem = Nothing
End If
End Sub
-----------------------------------------------------