Const intOK = 0 Const intWarning = 1 Const intCritical = 2 Const intUnknown = 3 const HKEY_CURRENT_USER = &H80000001 const HKEY_LOCAL_MACHINE = &H80000002 strSecondaryServer = "." Set StdOut = WScript.StdOut Set ScriptArg=Wscript.Arguments strPrimaryServer=ScriptArg(0) 'strSecondaryServer = ScriptArg(1) '// Get Primary Version SymanticPrimary=getSymanticVer(strPrimaryServer) '// Get Secondary Version SymanticSecondary=getSymanticVer(strSecondaryServer) if SymanticPrimary=SymanticSecondary Then } Wscript.Echo "Server " & strPrimaryServer & " is at virus def " & SymanticPrimary & " and the local Server is at virus def " & SymanticSecondary wscript.quit(intOK) } Else Wscript.Echo "Error!!! server " & strPrimaryServer & " is at virus def " & SymanticPrimary & " and the local Server is at virus def " & SymanticSecondary wscript.quit(intCritical) end if wscript.quit Function GetSymanticVer(ComputerName) Dim year, Month , Day, Ver_Major Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & ComputerName & "\root\default:StdRegProv") strKeyPath = "SOFTWARE\Symantec\SharedDefs\DefWatch" strValueName = "DefVersion" oReg.GetBinaryValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue Year= CLng("&H" & hex(strValue(1)) & hex(strValue(0))) Month= CLng("&H" & hex(strValue(3)) & hex(strValue(2))) Day= CLng("&H" & hex(strValue(7)) & hex(strValue(6))) Day= CLng("&H" & hex(strValue(7)) & hex(strValue(6))) Ver_Major = CLng("&H" & hex(strValue(17)) & hex(strValue(16))) SymanticVer= Year & "-" & Month & "-" & Day & " rev. " & Ver_Major GetSymanticVer=SymanticVer End Function