Try this:
Dim WshShell, LogServer, CompName, UserName
Dim fso, myFileName, objTextStream
Dim forReading, oRegEx, lineContents
Dim strMatch, i
Set WshShell = CreateObject("WScript.Shell")
LogServer = WshShell.ExpandEnvironmentStrings("%LOGONSERVER%")
CompName =...