How to uninstall the Ivanti Scheduler and clean up the ProPatches folder on the client machines in Ivanti Patch for Windows Server 9.3

Version 3


    This document will help you setup a Custom Action to remove the Ivanti Scheduler and cleanup of the client machine's C:\Windows\ProPatches folder.  A common use for this specific Customer Action would this reduce hard drive space used by deployments and/or uninstall the Ivanti Scheduler for troubleshooting purposes. 


    A Custom Action may include executing a specific command or invoking a custom batch file at specified time(s) during the deployment process. You can specify custom files and actions that occur during every deployment that uses the template, or only for those deployments that install a specific patch or service pack. 



    A Custom Action will only run if a deployment occurs. If there are no missing patches selected to deploy to a target machine, the Custom Action will NOT occur.  This is the reason for the custom Scan Template, it will scan for a Custom Action patch that is always missing on all target machines.  This allows you to deploy to machine where no patches are missing.

    The instructions will be covering 2 components required for this Custom Action:


    • A custom Scan Template setup to only scan for the Custom Action patch item.
    • A custom Deployment Template for the Custom Action setup and No Reboot option.


    Creating the Scan Template:


    1. Click on New > Patch Scan Template to create a New Scan Template; enter a Name for the Template, and Save it.
      1. Select Custom Actions under the Patch Properties tab.
      2. Save and close.



    Creating the Deployment Template:


              1. Create a new Deployment Template.

                   a. Give it a name, be descriptive.

                   b. Uncheck Send Tacker Status in the General tab.


              2. Navigate to the Post-Deploy Reboot tab and choose Never Reboot After Deployment. (this does not require a reboot)


              3. The first Custom Action will uninstall the Ivanti Scheduler. Navigate to the Custom Actions tab and click New.

                   a. Step 1 - Leave default

                   b. Step 3 - Change to After all Patches

                   c. Step 4 - Copy and paste the following command: "%PathtoFixes%..\..\Scheduler\stschedex.exe" /remove

                   d. Click OK


              4. The second Custom Action will remove the contents of the ProPatches folder. Click New.

                   a. Step 1 - Leave default

                   b. Step 3 - Change to After all Patches

                   c. Step 4 - Copy and paste the following command: if exist "%PathtoFixes%..\..\..\ProPatches" (RD /Q /S "%PathtoFixes%..\..\..\ProPatches")

                   d. Click OK

                   e. Save and close the Deployment Template


    You should test this new Custom Action on non-production machine.  For the test, I would suggest performing the scan alone using the new Scan Template, then choose to deploy the missing MSST-001 patch using the new Deployment Template.  This is to ensure the configuration is correct.  In my example, I will scan a machine from the Home Screen then choose to deploy from the scan results.  Once tested, you can choose to schedule a scan with automatic deployment.


    The scan test setup from the Home Screen:


    Here are the results showing the Custom Action patch:


    Right-click on the missing patch and choose Deploy > Selected Patches



    Configure the deployment to use your new custom Deployment Template and choose when to schedule the deployment to run:



    Due to the nature of the Custom Action, the Operations Monitor and Deployment Tracker will only show you the job was executed.  The job is complete once this happens.



    At this point, the Ivanti Scheduler has been uninstalled and the ProPatches has been cleaned up.




    The following cannot be deleted since the working directory for the Customer Action is in the ProPatches folder: (Total size left behind should be under 200KB)

    • Windows\ProPatches
    • Windows\ProPatches\Logs
    • Windows\ProPatches\Installation


    Affected Product(s)


    Ivanti Patch for Windows Servers 9.3.x