Here is the log file loading method...

 Code:
$odbcName = "tess_live_readonly"
$logfile = "C:\ODBC_LOG.txt"

If KeyExist("HKCU\Software\ODBC\ODBC.INI\" + $odbcName) OR KeyExist("HKLM\Software\ODBC\ODBC.INI\" + $odbcName)
   For Each $line in LoadFile($logfile, @CRLF)
      If InStr($line,@WkSta) AND InStr($line,@UserID)
         $logged=1
      Endif
   Next
   If Not $logged
      $nul = RedirectOutput($logfile)
      @Date+" - "+@Time+" - "+$odbcname+" Found on "+@WkSta+" under user "+@UserID ?
      $nul = RedirectOutput("")
   Endif
Endif

Function loadfile($file, optional $array, $Uni)
   DIM $fso,$f,$fs
   If $uni $uni = $uni-3 Else $uni = -2 Endif
   If Not $uni $uni = -2 Endif
   $fso = CreateObject("Scripting.FileSystemObject")
   $f = $fso.GetFile($file)
   If @ERROR Exit 2 EndIf
   $fs = $f.OpenAsTextStream(1,$uni)
   If Not $array
      $loadfile = $fs.Read($f.size)
   Else
      $loadfile = Split($fs.Read($f.size),$array)
   Endif
   Exit @ERROR
EndFunction