Custom Patch: Custom .exe File Distribution With Custom Action

Version 9



    The purpose of this document is to show how to distribute an executable file out using the Custom Patch Editor and Custom Action deployment.




    Adding Software to Shavlik Folder

    1) You must manually copy the software to distribute to the Shavlik Protect Console patch download folder. To find this location, go to the download folder designated under Tools > Operations.

    2) Navigate to that location using Windows Explorer, and copy all the software files here.


    Creating the Patch XML file

    1) Go to Tools > Custom Patch Editor in the Shavlik Console.


    2) Within the Custom Patch Editor, click on the link to ‘Create a new custom XML file’.



    3) Add a Display Name and Description. Don't click on 'Validate XML' just yet. This will be done on Step 16.


    4) Create a Custom Bulletin by either right-clicking 'Custom Bulletins' in the left hand pane and select Add new Bulletin or by clicking the 'Add Bulletin' button in the toolbar.


    5) In the right-pane add some information describing the software install.


    6) Next, either right-click on the Custom Products and click on 'Add New Product' or click on the 'Add Product' button in the toolbar.


    7) In the New Product page, add in the information on how Shavlik Protect will detect the product is installed. To find this, manually install the product and find it in the registry to populate this page. For this software, we are looking for the key NOT to exist on target machines so note that on the last line.


    NOTE: Only use 64-bit registry strictly for installation of the patch on 64-bit machines. If you use a combination of 64-bit and non-64-bit machines, you can setup a second product with an update registry key (using the same procedure in Step 7) and uncheck 'Use 64-bit Registry'.


    8) Right-click on Custom Patches and click on Add Custom Patch or click on the 'Add Patch' button in the toolbar.


    9) In the Scan Information tab, add a Patch number, select the Bulletin created in Step 5. Under Patch Type, select ‘Custom Actions’ and set a Severity option to ‘None’. This Patch Type is important to match in Step .

    10) Set the Registry Keys see if the custom patch is installed. for this example, use the Registry Key from Step 7. Click on the Registry Keys tab and click the Add button at the bottom to add a key.


    11) Add the same information from Step 7. Click OK to save.


    NOTE: Make sure the patch Bit Registry matches what you put in for the product in Step 7.

    12) On the Targeting tab, select the products the install applies to. Click the arrow to move the selected target product from the lower left pane to the lower right pane. In this example, the product is being installed on different operating systems and the products affect different OS's in the bulletin.


    Repeat Steps 9-12 for the 32-bit version install, if you have a machine that does not utilize 64-bit registry.


    13) Next, switch to the Deployment Information tab at the top



    14) Select the Language of the operating system the patch is being applied to and browse to the install file. Click the ellipses button to browse to the install file. Typically, it is a setup.exe. In this example, the ‘InstallWrapper.vbs’ file is used (third-party download and not supported by Shavlik). Add any switches for the command line of the install file (typically provided by the vendor of the patch install file)




    • Targeting is not required, however if not specified the update will be offered for all systems that meet the scanning requirements.
    • Your custom patch file needs to also be placed in your console download location. (Tools, Options, and Downloads)
    • If you added a custom product it will show under targeting available products. You will first need to save the XML and import the custom XML before your custom product will appear in the list.


    15) Click the Save button at the top (blue diskette) and give the XML a name.


    16) In the left-pane, click on your XML you created in Step 3. Click on the 'Validate XML' button. NOTE: You should validate the XML file anytime you make modifications to the XML file. Be sure to save the file before performing the validation to ensure that you are validating the most current file.


    17) Exit the Custom Patch Editor. You will be prompted to Import your XML file. Click on ‘Import now’.


    18) In the next window select the XML file check box before you click OK.



    Add a Patch Group

    1) To Add a Patch Group for Software Deployments, click the drop down menu under 'Home' and select Patch and SP Groups.


    2) Click on the ‘New’ button and select Patch Group. Name the Patch Group.



    3) Click on the ‘Add’ button and select the patch created in Step 9 from 'Creating the Patch XML file'. Click the 'Select' button at the bottom.


    4) Click the Save button at the bottom to save and exit the Patch Group. Using this Patch Group we will ONLY be scanning for the custom patch.


    Creating a Scan Template

    1) Click the ‘New’ button and select ‘Patch Scan Template’.

    2) Enter a name for the template. On the Filtering tab, uncheck all patches at the bottom under Patch Properties and only select ‘Custom Actions’ (Step 9 from 'Creating the Patch XML file').

    3) Select the Patch Filter settings, click the ‘Scan Selected’ option.  Under the Patch Groups window, click the ellipses button and select the patch group created in 'Add a Patch Group'.


    4) Click ‘Save’ at the bottom to save the Patch Scan Template.


    Creating a Deployment Template

    1) Click New > Deployment Template.


    2) Name your deployment template and set your options as necessary. Go to the Custom Actions tab. Select the install files required for your patch to be installed. This will include the .exe file and the .vbs (or some other batch file script/executable). Repeat this process for the other files.


    3) After adding the files, the Shavlik Protect Console needs to know what to file to run. All files will be copied to the local ‘C:\Windows\ProPatches\Install’ folder. The variable is %PATHTOFIXES%, use it in the execute line as shown:


    NOTE: Repeat Steps 2-3 for each patch you setup in Step 9 from 'Creating the Patch XML file'.

    4) Save the Deployment Template.


    Scanning and Deploying the Custom Patch

    1) Click on 'Home'. Select a Machine Group. Select a schedule. Select the Scan template from 'Creating a Scan Template'. Select the Deployment template from 'Creating a Deployment Template'. Click 'Scan Now'. Custom patches should be detected as missing and Custom Action files should be pushed, deployed and executed. This completes the custom patch install.


    Additional Information


    Additional information about custom patch creation and use can be found in the following articles:


    Special acknowledgement for Tony Barkdull of Sagamore Health Network for his contribution of this article.


    Affected Product(s)


    Shavlik Protect 9.X