Still no go. I receive no errors and the script does not pause for 7 seconds so I know it is not completeing. I have fixed the "instr" command and taken the "Then" statements out. Any other ideas?

$w2kwxp = @PRODUCTTYPE = "Windows 2000 Professional" OR @PRODUCTTYPE = "Windows XP Professional"

If $w2kwxp
Dim $WSHNetwork, $fso
$WSHNetwork = CreateObject("WScript.Network")
$fso = CreateObject("Scripting.FileSystemObject")

Dim $LogEntry
$UName = @USERID
$DName = @LDOMAIN
$CName = @WKSTA

Dim $Status
$Status = "NotLogged"
If $fso.FileExists("\\nserv\wkslogs$\" + $CName + ".txt")
Dim $SearchString
$SearchString = ($DName + "\" + $UName)
Dim $ParseFile, $TextStream, $TextLine
$ParseFile = $fso.GetFile("\\nserv\wkslogs$\" + $CName + ".txt")
$TextStream = $ParseFile.OpenAsTextStream
While Not $TextStream.AtEndOfStream
$TextLine = $TextStream.ReadLine
If InStr($TextLine,$SearchString) <> 0
Status = "AlreadyLogged"
End If
Loop
$TextStream.Close
End If



If $Status = "NotLogged"
Dim $Logfile
$Logfile = ("\\nserv\wkslogs$\" + $CName + ".txt")
Dim ologfile
$ologfile = fso.OpenTextFile($Logfile, 8, True)
$ologfile.writeline ($DName + "\" + $UName)
$ologfile.close
End If
End If

Sleep 7

Exit