Endpoint Analysis Antivirus Scan Package Autoupdate Scripts
Created: January 3, 2006
Updated: October 9, 2006
Description
The Access Gateway Advanced Edition features a command line executable called CtxEpaParamUpdate.exe, which can be used to update existing Scan Rule values. A practical application of this tool is the update of existing Endpoint Analysis Scan Rules defined for antivirus engine and/or virus signature (DAT) file versions.
A collection of Visual Basic scripts is provided in this article as an example of how to retrieve antivirus engine and DAT values from local installations or publicly accessible vendor Web sites, then automate the value retrieval as well as the Endpoint Analysis scan rule values using the aforementioned application and the Microsoft Windows Task Scheduler.
Prerequisites
Installing the Antivirus Scan Package Autoupdate Scripts
How to Use Endpoint Analysis Antivirus Scan Package Autoupdate Scripts
These scripts have two main functions:
• Retrieve update values from a local installation or remote antivirus vendor Web repository
• Update the Endpoint Analysis scan rule values utilizing the CtxEpaParamUpdate.exe utility
The syntax and parameters of this command are as follows:
CtxEpaParamUpdate <package_uri> <package_version> <scan_name> <rule_name> <param_name> <new_value>
CtxEpaParamUpdate Parameters:
<package uri> <package_version> - These values can be obtained by selecting the Scan Package in the Navigation pane and the Properties view in the Details pane while in the Advanced Access Control Access Suite Console. The URI is the full path as shown in the following graphic:

<scan_name> <rule_name> - These values represent the names of the configured Endpoint Analysis antivirus scan and respective rule. Copy the names of these entities (shown next to the red arrows in the following graphic) from the Access Suite Console to the script.

<param_name> <new_value> - To get these values, highlight the scan rule in the Navigation tree and change the Details pane view to Properties. The <new_value> should be the value you wish to update the specified parameter to.
Note: With the exception of the <package uri> and <package_version> parameters, all parameters must be enclosed in quotes. Below is an example execution string:
CtxEpaParamUpdate.exe http://www.citrix.com/EndPointAnalysisPackages/CitrixVSEMcAfee.cab 1.0 “Scan 1” “Rule 1” “PatternVersion” “4481”
-Or-
CtxEpaParamUpdate.exe http://www.citrix.com/EndPointAnalysisPackages/CitrixVSEMcAfee.cab 1.0 “Scan 1” “Rule 1” “EngineVersion” “4.4.00”
To automate the execution of these scripts, a scheduled task must be created with the Microsoft Windows Task Scheduler. Use the following procedure:


After the scripts have run once, a log file and a checkpoint file are created in the same directory the scripts are located in. The log displays the status of the execution and whether or not an update to the antivirus scan rule was made.
The checkpoint file is referenced by the script each time it runs to compare what the last retrieved value was to that on the repository source. If the latter is newer, the antivirus scan rule values are updated accordingly.
Note: If you are monitoring values in the Access Suite Console while running the scripts to ensure your rule values are updating properly, you must run Discovery on the Endpoint Analysis node of the Navigation tree by selecting this option in the Tasks pane.
Access Gateway Advanced Edition service packs, hotfixes, or version updates may contain newer versions of the Endpoint Analysis antivirus scan packages. Since the version numbers change when this occurs, the scripts must be updated to reflect that change because those values are currently hard-coded in the script.
Uninstalling Antivirus Scan Package Autoupdate Scripts
To remove the autoupdate scripts, remove the scheduled task entry for that script and delete the directory or files. You can also disable the script from running by clearing the Enabled check box in the task’s properties dialog in the Windows Task Scheduler (as shown in the following graphic):

Disclaimer
The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.