Guys:
Hope someone can help - sure this is fairly obvious to an experience scripter but can someone please explain why my code will not compile:
______________________________________
Dim objFso, objFile, returnString, arrError, i
Const FOR_READING = 1
Set objFso = WScript.CreateObject("Scripting.FilesystemObject")
If objFso.FileExists ("C:\windows\setuplog.txt") Then
Set objFile = objFs
penTextFile("C:\windows\setuplog.txt", FOR_READING)
Do While objFile.AtEndOfStream <> True
returnString = objFile.ReadLine
If InStr (returnString, "Error") Then
For i = 0 To UBound(arrError)
arrError(i) = returnString
Wscript.echo returnstring
ReDim preserve arrError(i)
i = i + 1
Next
End If
Loop
End If
ChrisCj21
MCSE, A+, N+
Hope someone can help - sure this is fairly obvious to an experience scripter but can someone please explain why my code will not compile:
______________________________________
Dim objFso, objFile, returnString, arrError, i
Const FOR_READING = 1
Set objFso = WScript.CreateObject("Scripting.FilesystemObject")
If objFso.FileExists ("C:\windows\setuplog.txt") Then
Set objFile = objFs
Do While objFile.AtEndOfStream <> True
returnString = objFile.ReadLine
If InStr (returnString, "Error") Then
For i = 0 To UBound(arrError)
arrError(i) = returnString
Wscript.echo returnstring
ReDim preserve arrError(i)
i = i + 1
Next
End If
Loop
End If
ChrisCj21
MCSE, A+, N+