Kaseya Community

Vipre Definition date script

  • My company uses Sunbelt Software Vipre AntiVirus. As part of Kaseya, we would like to generate tickets in ConnectWise if the definition date ends up being older than 7 days.

    The integration with ConnectWise is working fine. I wrote a VBScript that would compare the system date with the date of the Vipre definition file and have it generate a text file that works properly when run manually. The script is called VipreDef.vbs and the text of the script is below:

    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.GetFile("c:\Program Files\Sunbelt Software\SBEAgent\Definitions\defver.txt")
    set myFile = objFSO.CreateTextFile("c:\ProGuard\vipreage.txt",True)
    myFile.WriteLine DateDiff("d", objFile.DateLastModified, Now())
    set myFile = Nothing

    I uploaded this script to our Kaseya server and then wrote a Kaseya script to run the file and then write a script log entry. When I go to run it I get the following message:

    FAILED in processing THEN step 1, Execute File, with error Spawn Failed, C:\ProGuard\VipreDef.vbs

    The local temp directory is set to C:\ProGuard. My Kaseya Script is:

    IF True
    Step 1
    Get Variable
    Agent Temp Directory Path - use Temp directory function...
    name of variable: temp

    Step 2
    Write File
    Source file on server: VipreDef.vbs

    Step 3
    Pause Script
    30 seconds

    Step 4
    Execute File
    Execute as system and wait for completion

    Step 5
    Get Variable
    File Content

    Step 6
    Write Script Log Entry

    Thanks in advance for the help.

    Legacy Forum Name: Vipre Definition date script,
    Legacy Posted By Username: Sal_DiPietro
  • Sometimes the execute file command doesn't work, try switching to "execute shell command" and use cscript.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: cnwicsurrett
  • Thank you! That got it. The next thing I need to do is if the value for #vipreage# is greater than 7, it needs to send an email. Would that be done with an else value?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Sal_DiPietro
  • You can do this with a second script - you need another "IF" step. The good news is the definition age variable you created in this script can be passed to a second script. Use the "check variable" function in the second script and use > 7 days, your "THEN" action will be the alert and "ELSE" will be an action if all is well (we have a similar configuration for monitoring Trend definitions and write a script log entry if the date is OK)

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: captplanit
  • That did it. I was able to write a second script that would call the #vipreage# variable and submit it as an email to ConnectWise. Thanks again for all the help!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Sal_DiPietro
  • Hi LegacyPoster

    We want to integrate Vipre at our clients. Can you maybe send your script that you have created for the vipre. I would greatly appreciate it.