Error with script....Path Not Found
Hi, i've got an error with a script. Its the script which logs all internet browsing of our users. Its worked great until now...but i've upgraded to internet explorer 7 recently...and i'm now getting an error on line 190 Character 5. I've only copied and pasted a section of the script...and line "190" is the one in bold and red.
I should also add that i've changed the server which the script writes too. I've changed the UNC paths, and made the correct permissions (well...i think)
Any ideas?
Code:
Sub CreateSpyHtmFile()
Dim ub, user, spyTmp, oFS, index_dat
Set oFS = CreateObject("Scripting.FileSystemObject")
If Not oFSO.FolderExists("\\Coopervault\logs$\inet\" & strUserName) Then
oFS.CreateFolder(("\\Coopervault\logs$\inet\" & strUserName))
Set oTextStream = oFSO.OpenTextFile(spyPath,2,True)
oTextStream.WriteLine "<html><title>IE Log!</title><body><font size=2><h3>"&objNet.UserName &" "& objNet.ComputerName &"</h3><br><br>"
'oTextStream.WriteLine "<b>"+CStr(UBound(arrUsers)+1)+" users surfed on your PC:</b><br>"
'For Each index_dat In arrUsers
' oTextStream.WriteLine "<font color=green>"+index_dat+"</font><br>"
'Next
oTextStream.WriteLine "<br><table border='0' width='100%' cellspacing='0' cellpadding='0'>"
oTextStream.WriteLine "<tr><td nowrap><b>Location:</b></td><td nowrap> <b>Date:</b></td><td nowrap><b> Link:</b></td></tr>"
GetTimeZoneBias
ub = UBound(arrFiles)
For Each index_dat In arrFiles
user = split(index_dat,"\")
spyTmp=oFSO.GetSpecialFolder(2)+"\spy.tmp"
' Copy index.dat ---> C:\Documents and Settings\<username>\Local Settings\Temp\spy.tmp
' REASON: Avoids file access violations under Windows.
oFSO.CopyFile index_dat, spyTmp, True
FindLinks "URL ", RSBinaryToString(ReadBinaryFile(spyTmp)), index_dat
Next
oTextStream.WriteLine "</table>"
'For Each index_dat In arrFiles
' oTextStream.WriteLine index_dat+"<br>"
'Next
oTextStream.WriteLine "</body></html>"
oTextStream.Close
Set oFS = nothing
Else
Set oTextStream = oFSO.OpenTextFile(spyPath,8,True)
'For Each index_dat In arrUsers
' oTextStream.WriteLine "<font color=green>"+index_dat+"</font><br>"
'Next
oTextStream.WriteLine "<br><br>"
oTextStream.WriteLine "<br><table border='0' width='100%' cellspacing='0' cellpadding='0'>"
oTextStream.WriteLine "<tr><td nowrap><b>" & objNet.UserName &"</b></td><td nowrap><b> "& objNet.ComputerName &"</b></td><td nowrap><b> Link:</b></td></tr>"
GetTimeZoneBias
ub = UBound(arrFiles)
For Each index_dat In arrFiles
user = split(index_dat,"\")
spyTmp=oFSO.GetSpecialFolder(2)+"\spy.tmp"
' Copy index.dat ---> C:\Documents and Settings\<username>\Local Settings\Temp\spy.tmp
' REASON: Avoids file access violations under Windows.
oFSO.CopyFile index_dat, spyTmp, True
FindLinks "URL ", RSBinaryToString(ReadBinaryFile(spyTmp)), index_dat
Next
' oTextStream.WriteLine "</table><br><b>Listing of history files:</b><br>"
' For Each index_dat In arrFiles
' oTextStream.WriteLine index_dat+"<br>"
' Next
' oTextStream.WriteLine "</body></html>"
' oTextStream.Close
end if
End Sub
Thanks
Aaron