'On Error Resume Next Const adOpenStatic = 3 Const adLockOptimistic = 3 Const adCmdText = &H0001 Const PortNum = 7250 Const HKEY_LOCAL_MACHINE = &H80000002 Dim ptchver, RQCExecute Removal = example1a strComputer = "." 'Set the Registry to Support TAB delimited Files Set objReg=GetObject("winmgmts:\\" & strComputer & _ "\root\default:StdRegProv") strKeyPath = "SOFTWARE\Microsoft\Jet\4.0\Engines\Text" strValueName = "Format" strTabValue = "TabDelimited" objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strTabValue Set objConnection = CreateObject("ADODB.Connection") Set objRecordSet = CreateObject("ADODB.Recordset") strPathtoTextFile = "C:\" objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & strPathtoTextFile & ";" & _ "Extended Properties=""text;HDR=YES;FMT=TabDelimited""" objRecordset.Open "SELECT * FROM Result.txt", _ objConnection, adOpenStatic, adLockOptimistic, adCmdText Do Until objRecordset.EOF If objRecordset.Fields.Item("Status") <> "Information" then If objRecordset.Fields.Item("Status") <> "Note" then ptchver = "Missing" Exit Do Else ptchver = "Present" End If End If objRecordset.MoveNext Loop ' Send a ping to the RQS Service to drop the Quarantine ' %RQCLOC%/rqc.exe %DialRasEntry% %TunnelRasEntry% 7250 %DOMAIN% %USERNAME% example1a If ptchver = "Present" then Dim objArgs Set WshShell = WScript.CreateObject("WScript.Shell") Set objArgs = WScript.Arguments wscript.echo "c:\rqc.exe " & objArgs(1) & " " & """" & objArgs(2) & """" & " " & PortNum & " " & objArgs(3) & " " & objArgs(4) & " " & "Example1a" wshshell.run("c:\rqc.exe " & objArgs(1) & " " & """" & objArgs(2) & """" & " " & PortNum & " " & objArgs(3) & " " & objArgs(4) & " " & "Example1a") else wscript.echo "Patches have found to be missing. Please visit WindowsUpdate to ensure your machine is patched" End If ' Set the Registry back to the default CSV Delimited Files strCSVValue = "CSVDelimited" objReg.SetStringValue _ HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strCSVValue