' Query the AV status Set objWMISvc = GetObject( "winmgmts:{impersonationLevel=impersonate}!//./root/SecurityCenter2" ) Set colItems = objWMISvc.ExecQuery( "SELECT * FROM AntiVirusProduct" ) For Each objItem in colItems strMsg = strMsg & objItem.displayName & "," & objItem.versionNumber & vbCrLf Next Set colItems = Nothing Set objWMISvc = Nothing ' Log the result; variable 'strLog' and constant 'ForAppending' need to be set before Set objFSO = CreateObject( "Scripting.FileSystemObject" ) Set objLog = objFSO.OpenTextFile( strLog, ForAppending, True, TristateFalse ) objLog.WriteLine strMsg objLog.Close Set objLog = Nothing Set objFSO = Nothing