Script to notify a user to close an application during an update.
- Download the 2 scripts in this repository to the device running Patch My PC
- Set the "$PrescriptTimeout" for the amount of time you want the notification to be available for the user. (Note that Updates have a 10 minute runtime by default and the prescript runtime is included in that runtime)
- Run the "CreateNotificationScripts.ps1", this will create a powershell script for each update available in Patch My PC in a new folder
- Copy the desired scripts to a central location where the Patch My PC publisher can access them.
- In Patch My PC right click the desired product and choose either "Skip installation when the application is in use" or "Auto close application processes before installation", note that this will be the behavior of the update when a user ignores the notification toast or hits the "Ignore" button.
- Right click the desired product and choose "Add custom pre/post update installation scripts"
- Check the box for "Run the pre-update script before performing any auto-close or skip process checks"
- Click "Browse" for the "Pre-Update Script", and navigate to the appropriate script that was generated for this app.
- Repeat steps 4 through 8 for all desired products