Kaseya Community

e-mail registry value

  • Hi,

    I'm trying to make a script that looks for a value in the registry (HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\ScanMail for Exchange\CurentVersion , value of PR_AC), then e-mails it to me.

    Any help would be appreciated!

    thanks Jarrad

    Legacy Forum Name: e-mail registry value,
    Legacy Posted By Username: jarrad.leening
  • a quick example
    the disabled steps might be required if you get a garbled email. the type command converts from unicode to ascii.

    Script Name: reg value example
    Script Description:

    IF Check Registry Value
    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\ScanMail for Exchange\CurentVersion\PR_AC
    Exists :
    THEN
    Get Variable
    Parameter 1 : 0
    Parameter 2 : HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\ScanMail for Exchange\CurentVersion\PR_AC
    Parameter 3 : returnData
    OS Type : 0
    Execute Shell Command
    Parameter 1 : echo #returnData# | type >> #vAgentConfiguration.agentTempDir#\regPR_AC.txt
    Parameter 2 : 1
    OS Type : -1
    Get Variable
    Parameter 1 : 1
    Parameter 2 : #vAgentConfiguration.agentTempDir#\regPR_AC.txt
    Parameter 3 : returnData
    OS Type : -1
    Send Email
    Parameter 1 : you@yourdomain.com
    Parameter 2 : ScanMail PR_AC data
    Parameter 3 : #returnData#
    OS Type : 0
    ELSE



    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: mparr
  • I ended up going with:

    Script Name: Get Trend Micro key
    Script Description:

    IF Check Registry Value
    Parameter 1 : HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\ScanMail for Exchange\CurrentVersion\PR_AC
    Exists :
    THEN
    Get Variable
    Parameter 1 : 0
    Parameter 2 : HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\ScanMail for Exchange\CurrentVersion\PR_AC
    Parameter 3 : trend
    OS Type : 0
    Get Variable
    Parameter 1 : 6
    Parameter 2 :
    Parameter 3 : machine
    OS Type : 0
    Send Email
    Parameter 1 : you@yourdomain.com
    Parameter 2 : [#machine#] - Trend Micro Key
    Parameter 3 : Machine: #machine# , Trend Micro Key: #trend#
    OS Type : 0
    ELSE


    Thanks for your help!

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: jarrad.leening
  • You can skip a step in your script using the new sql view variables.

    http://help.kaseya.com/WebHelp/en-US/5010000/2701.htm

    any of the views and their columns can be accessed by

    #view.columnname#

    so, to get the computername you could

    #vMachine.ComputerName#

    as a variable for the computer name.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: mparr