@Echo Off BEGIN COMMENT Rem This sample network quarantine script checks for the existence of a file. If it Rem exists, the test is considered a success and the RAS server lifts the quarantine. Rem END COMMENT Echo RAS Connection = %1 Echo Tunnel Connection = %2 Echo Domain = %3 Echo User Name = %4 Echo Service Directory = %5 BEGIN COMMENT Rem Create the %rqlcoc% variable, which contains rqc.exe?s full pathname. END COMMENT Set rqcloc=%5 qc.exe BEGIN COMMENT Rem Create the %TARGETFILE% variable, which sets the target file?s location and name. END COMMENT Set TARGETFILE=C:WindowsSystem32access.txt BEGIN COMMENT Rem The following section contains the policy-compliance tests. You place Rem all the checks to be made on the client (e.g., checking for the existence Rem of a file or antivirus software) here. END COMMENT If Not Exist %TARGETFILE% Goto :TESTFAIL BEGIN COMMENT Rem All checks are successful, so let?s ask the VPN server to lift the quarantine. Rem To do so, the script needs rqcloc.exe?s usage parameters: Rem %1 = %DialRasEntry% Rem %2 = %TunnelRasEntry% Rem %3 = %Domain% Rem %4 = %UserName% Rem Rem Port 7250 is the TCP port on which rqs.exe is listening. Rem Version1 is a string that specifies the version of the quarantine script. Rem This version number must match one of the version number entries in the Rem HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesRQS registry Rem subkey on the RAS server. END COMMENT %rqcloc% %1 %2 7250 %3 %4 Version1 BEGIN COMMENT Rem Print out the status of rqcloc.exe?s execution to the user. You can comment out Rem the rest of the statements in this section after you know the script works well. END COMMENT If «%ERRORLEVEL%» == «0» ( Set MYERRMSG=Success! ) Else If «%ERRORLEVEL%» == «1» ( Set MYERRMSG=Unable to contact remote access gateway. Quarantine support may be disabled. ) Else If «%ERRORLEVEL%» == «2» ( Set MYERRMSG=Access denied. Please install the Connection Manager profile from http://www.corpnet.example.com/remote_access_tshoot.asp and reconnect. ) Else ( Set MYERRMSG=Unknown failure. The client will remain in quarantine mode. ) Echo %MYERRMSG% Pause Goto :EOF BEGIN COMMENT Rem If the test fails, jump to this point. END COMMENT :TESTFAIL Echo Your computer has failed network compliance tests. Echo Check with your systems administrator for the proper file. BEGIN COMMENT Rem Replace «Insert Help URL here» with the URL to your online Help file. END COMMENT Echo Insert Help URL here Pause :EOF