Ad Widget

Collapse

Version of McaFee Enginee Script[NOT TESTED]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tadorm
    Junior Member
    • Apr 2009
    • 2

    #1

    Version of McaFee Enginee Script[NOT TESTED]

    It´s supposed to be a script for determine your DAT version, but isn´t tested yet.

    Option Explicit

    Const strOU = "OU=MySubOU,OU=MyOU,DC=mydomain,DC=com"

    Const HKLM = &H80000002
    Dim objFSO, objFile
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.CreateTextFile(objFSO.GetParentFolderName(W script.ScriptFullname) & "\McAfee_versions.txt", True)

    Dim objConnection
    Set objConnection = CreateObject("ADODB.Connection")
    objConnection.Open "Provider=ADsDSOObject"

    Dim objCommand
    Set objCommand = CreateObject("ADODB.Command")
    objCommand.ActiveConnection = objConnection
    objCommand.Properties("Page Size") = 1000


    ' Get all names of all computer accounts
    objCommand.CommandText = "SELECT name FROM 'LDAP://" & strOU & "' WHERE objectCategory='computer'"
    Dim objRS
    Set objRS = objCommand.Execute

    ' Loop through computer names and check McAfee definition versions
    Dim objReg, strDAT, strMajor, strMinor
    On Error Resume Next
    WriteOut "Hostname" & vbTab & "Engine version" & vbTab & "DAT version"
    Do Until objRS.EOF
    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & objRS("name") & "\root\default:StdRegProv")
    If Err.Number = 0 Then

    objReg.GetDWORDValue HKLM, "SOFTWARE\McAfee\AVEngine", "EngineVersionMajor", strMajor
    objReg.GetDWORDValue HKLM, "SOFTWARE\McAfee\AVEngine", "EngineVersionMinor", strMinor
    objReg.GetDWORDValue HKLM, "SOFTWARE\McAfee\AVEngine", "AVDatVersion", strDAT
    WriteOut objRS("name") & vbTab & vbTab & strMajor & "." & strMinor & vbTab & strDAT
    Else
    WriteOut objRS("name")
    End If
    Set objReg = nothing
    objRS.MoveNext
    Loop



    Sub WriteOut(strText)
    'Write text to file
    objFile.WriteLine strText

    ' Write text to screen if running under cscript
    If Instr(1, Wscript.FullName,"cscript",1) Then
    Wscript.Echo strText
    End If
    End Sub
  • Shoikan
    Junior Member
    • Jun 2009
    • 10

    #2
    Just out of true and genuine curiosity, why wouldn't you use something like McAfree ePO for that? It's much more suited to monitoring this stuff for you. It will give you all kinds of juicy details about the clients as well in the process, be able to update them and enforce policies. While I would agree that you can monitor anything with Zabbix, I'd say this is one of the few cases where I'd do it externally...

    Comment

    • NOB
      Senior Member
      Zabbix Certified Specialist
      • Mar 2007
      • 469

      #3
      Originally posted by Shoikan
      Just out of true and genuine curiosity, why wouldn't you use something like McAfree ePO for that? It's much more suited to monitoring this stuff for you. It will give you all kinds of juicy details about the clients as well in the process, be able to update them and enforce policies. While I would agree that you can monitor anything with Zabbix, I'd say this is one of the few cases where I'd do it externally...
      Hi Shoikan

      [warning: slightly OT ahead]
      you seem to know ePO and McAfee, so I want to ask a question:

      How can you enforce the installation in the english language instead
      of some other language, like the one of the user of ePO ?
      Thanks in advance for your response.

      This is somehow ZABBIX related, because the name of the service
      will change according to the language used for installation. E.g.,
      McAfee Framework Service (english) vs. McAfee Framework-Dienst (german).

      Regards

      Norbert.

      Comment

      • Shoikan
        Junior Member
        • Jun 2009
        • 10

        #4
        Originally posted by NOB
        Hi Shoikan
        How can you enforce the installation in the english language instead
        of some other language, like the one of the user of ePO ?
        Thanks in advance for your response.
        Ooooh, good question. Yes I know my way around ePO fairly well, unfortunately it's been quite a while ago since I last worked with it, so I am unsure of the answer to this. Sorry

        Comment

        Working...