Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Error with script....Path Not Found


Recommended Posts

Posted

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?

 

 

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 "IE Log!"&objNet.UserName &" "& objNet.ComputerName &"

"     
       'oTextStream.WriteLine ""+CStr(UBound(arrUsers)+1)+" users surfed on your PC:
"    
       'For Each index_dat In arrUsers
       '    oTextStream.WriteLine ""+index_dat+"
"             
       'Next 
       oTextStream.WriteLine "
"
       oTextStream.WriteLine "Location: Date:  Link:"
       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\\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 ""    
       'For Each index_dat In arrFiles
       '    oTextStream.WriteLine index_dat+"
"      
       'Next    
       oTextStream.WriteLine ""
       oTextStream.Close
       Set oFS = nothing 

   Else

  [color="Red"][b][b] Set oTextStream = oFSO.OpenTextFile(spyPath,8,True)[/b][/b][/color]

        'For Each index_dat In arrUsers
         '    oTextStream.WriteLine ""+index_dat+"
"             
      'Next 
      oTextStream.WriteLine  "

"
      oTextStream.WriteLine "
"
      oTextStream.WriteLine "" & objNet.UserName &" "&  objNet.ComputerName &"  Link:"
      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\\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 "
Listing of history files:
"    
      ' For Each index_dat In arrFiles
      '     oTextStream.WriteLine index_dat+"
"      
      ' Next    
      ' oTextStream.WriteLine "
"
      ' oTextStream.Close
   end if
End Sub

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...