If err.number<>0 Then
'wscript.echo "There is an error connecting to " & UCASE(sServer) & VBCRLF & _
' "Error #" & err.number & " - " & err.description
s="~" & vbTAB & UCASE(sServer) & vbTAB & err.description
'wscript.echo s
Set fso = CreateObject("Scripting.FileSystemObject")
sPath = StrReverse(WSCript.ScriptFullName)
sPath = Right(sPath, Len(sPath) - (InStr(sPath, "\")-1))
sPath = StrReverse(sPath)
Set f = fso.OpenTextFile(StrPath & sLogFile, ForWriting, True)
'Set f = fso.OpenTextFile(StrPath & "RemoteWINSConfig.log", ForWriting, True)
f.WriteLine s
wscript.quit
End If
Err.Clear
oSvc.Security_.ImpersonationLevel=3