How To: Run An Executable or MSI With A Custom Action

Version 8

    Purpose

     

    The purpose of this document is to show to how run an msi or executable with a custom action. For the example in this document, we will be using a .msi file which may use different command line switches than an .exe file. However the process of executing each file is the same.

    Please check our supported products to see if you can install a program using a software distribution Ivanti Patch for Windows Software Distribution Best Practices And Informational Guide  before trying to install a program with a custom action as that will be much more efficient. For instance, we are using an installation of Google Chrome as an example in this document, but we would recommend that you use a supported software distribution to install Google Chrome under most normal circumstances.

     

    Overview

     

    Test the command that will be used to run the executable or msi on the target machine

     

    1. Open a command prompt as the system account as is specified here:How To Test SYSTEM Account Permissions  and navigate to the proper location of the .msi in the command prompt.

    2. Run the .msi in the command prompt with the necessary switches needed to run it silently. Usually a quick online search will give you the information you need to run. For example, this article installation - How can I silently install Google Chrome? - Super User gives the information necessary to run a Google Chrome .msi silently.

    The .msi must be run silently and as the system account in order to work with a custom action.

    Installing Chrome MSI Successful.PNG

     

    3. Verify that the command executed successfully. Since the .msi we are using installs Google Chrome, we can validate that the .msi command ran successfully by checking installed programs for Google Chrome.

    Make sure that no prompts come up during the installation as that would indicate that the installation did not happen silently.

    4. Once you are sure that the .msi file can be successfully run silently in a system command prompt as the system account and copy the .msi file to your console server.

     

    Create and deploy a custom action to run the executable or .msi file.

     

    1. Go to New > Deployment Template to make a new Deployment Template or else open your existing template.

    2. Name and save your template if necessary then click on the Custom Actions tab in the template.

    Custom Action Tab.PNG

     

    3. Click New, leave Step 1 and 2 default unless you have a reason to change them, then select Push File in Step 3.

    4. In Step 4, browse to the location of the .msi file on your server by using the button with the ellipses off to the side then save the current task in the custom action.

    Push File.PNG

     

    5. Open another custom action by clicking New, leave Step 1 and 2 default unless you have a reason to change them, then select After All Patches in Step 3.

    6. In Step 4, input the exact command that you used in testing on your local machine and save this custom action task. As we are installing Google Chrome, we will use the following command:

    msiexec /q /i googlechrome.msi

    MSI Install Command.PNG

     

    7. Save your deployment template. You may elect to have machines not reboot after the deployment in the Post-deploy and Pre-deploy Reboot tabs of the template

    8. Run a scan on the machine you wish to run your .msi or .exe on. If you do not wish to install actual patches, you can scan for the null patch as is mentioned here How to: Scan for the Null Patch using the Custom Actions scan filter

    9. Deploy your patch(s) and select the deployment template that you created.

     

    Affected Products

     

    • Ivanti Patch for Windows Servers 9.3
    • Shavlik Protect 9.2