BatchPatch has a lot of built-in options to facilitate customizing your Windows Update process or your process for updating a third-party application. Today I want to illustrate one way to use BatchPatch to proceed with an update installation only after it confirms that a remote process is no longer running.
Maybe your environment has some requirements that prevent you from starting a patch installation or update process on target computers until after a certain process is no longer running on those target computers. Imagine you have someProcess.exe that you want to ensure is not still running at the time that you launch a remote Windows Update installation on various target computers. Here is one way to do it:
- In BatchPatch you’ll need to create a job queue. Select the desired rows/hosts in the grid, and then click Actions > Job Queue > Create/modify job queue
- In the Job Queue window I’ve created a queue which will test the target computer for a specific running process (someProcess.exe). If that process is found to be running, the Job Queue jumps to the label STILL RUNNING, which effectively makes a loop. It waits 5 minutes and then performs the same check. The process will loop indefinitely, checking for the existence of that running process every 5 minutes. If/when the process is found to no longer be running on the target computer, only then will the job queue advance to the next step, which in this case is to Download and install updates + reboot always.
- In the Job Queue above you can see the steps are as follows:
step 1: Label:STILL RUNNING
step 2: Wait 5 minutes
step 3: If specified process (someProcess.exe) is running, goto label:STILL RUNNING
step 4: Label:PROCESS NO LONGER RUNNING
step 5: Download and install updates + reboot always - At this point we can either click Execute now to start the job queue on all of the currently selected hosts/rows in the grid, or if we want to save the grid for later use (or to be run as a scheduled task), we can give the queue a title and then add it to our saved queues by clicking the double-right-arrow button in the Job Queue window.