Kaseya Community

Define View based on Multiple Applications

This question is not answered

Hello! I need to figure out a way to create a view based on the agent not having one of two different programs installed. I can create a view that shows me the agents missing one application or the other, but I haven't found a way to combine the listing. Here's what I am trying to do. We have about 3000 desktops in our organization, and for the most part either Symantec Endpoint Protection or the older Symantec Antivirus is installed. What I need to be able to display is a listing of agents that do not have one of the two installed.  Listing multiple applications in the "Missing application" box of the view definition does not produce the desired results. I've tried listing the two executables with OR between, I've tried putting the executables in double quotes and also in single quotes, but nothing works. The Advanced filter set does not appear to be able to filter based on audit information, so that didn't work either. Does anybody know a way that I can get my listing?

Thanks,

David

All Replies
  • David, I don't know how to accomplish that with a view as I've run in to the same problem as you. One of the things I've done to get around it was to use a vbscript that runs and checks for those app's from the add/remove keys. I then write that to an event log and have kaseya pull the results. From there you should be able to do an event log set that writes to the script log or creates a ticket. 

    You could even change the script up to write to a log file on the c:\ and then pull that back into kaseya and write to agent procedure log. Anyway, here's the script:

    if you notice, I've used "Ticket Trigger" in my event set that I create, this is what I use to look for in Event Set to trigger an action of my desire. You could taylor that to what ever you like, and this script is fairly flexible so it should work on more then just adobe and symantec. The usage is fairly simple 

    Kscript that writes app_ver_check.vbs to c:\kworking

    execute shell command 'c:\kworking\app_ver_check.vbs symantec 1001'   

    the 1001 should be the version of symantec (or what ever app you're looking for) but you'll want to check the version string in the uninstall key (registry) as that's what this is looking to match. It should report back version deficiencies meaning anything less then 1001 for version number. Anything greater then it'll see as accetpable 

     

     

    'Created By Danrche

    'run with command line arguments 

    'to get app string match 

    'and version match or less then

    'example :

    'app_ver_check.vbs "adobe reader" 1001

    'that should check for adobe reader

    'versions are upto date for 10

     

     

    Set oArgs = WScript.Arguments

    iCount = WScript.Arguments.Count

    sCmdLine0 = WScript.Arguments.Item(0)

    iCmdLine1 = WScript.Arguments.Item(1)

    If iCount <> 2 Then

    WScript.Echo "The correct usage is 'App_Ver_Check.vbs 'app' 'version''"

    ElseIf IsNumeric(iCmdLine1) <> True Then

    WScript.Echo "The version number should be of a numerical value with no '' or ."

    Else

    sfindapp sCmdLine0, iCmdLine1

    End IF

     

    Sub sfindapp(sAPP, iVersion)

    On Error Resume Next

    iFound = 0 'place holder if not found

    Const HKEY_LOCAL_MACHINE = &H80000002

    Set WshShell = WScript.CreateObject("WScript.Shell")

    Set WshNetwork = WScript.CreateObject("Wscript.Network")

    Set oReg = GetObject("winmgmts:\\" & WshNetwork.ComputerName & "\root\default:StdRegProv")

    strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"

    oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

    For Each subkey In arrSubKeys

    disHolder = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" _

    & subkey & "\DisplayName")

    disVer =  WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" _

    & subkey & "\DisplayVersion")

    If instr(1, disHolder, sAPP, 1) = 1 Then

    iFound = 1

    myArray = split(disVer, ".")

    t = ""

    For Each x In myArray

    t = t & x

    Next

    If CInt(t) >= CInt(iVersion) Then

    'Wscript.Echo CInt(t) & " " & CInt(iVersion)

    WshShell.LogEvent 4 , disHolder & " Version is " & disVer

    ElseIf CInt(t) < CInt(iVersion) Then

    'Wscript.Echo CInt(t) & " " & CInt(iVersion) & "2nd"

    'writes to event log as info

    miMsg = "Ticket Trigger" & vbCrlf & disHolder & " Version Deficiency " & disVer

    WshShell.LogEvent 4, miMsg

    End If

    End If

    Next

    If iFound = 0 Then WshShell.LogEvent 4, "Ticket Trigger " & sAPP & " was not found"

    End Sub

     

  • Thanks danrche, I'll give that a try.

    Cheers!

    David