My applications can't be opened after an update
Scappman uses the PSADT module to add some additional features.
One of these features is to make sure that during an update, the application can't be opened to make sure files are not in use during the update. This function is called Block-AppExecution and does the following:
Makes a copy of this script in a temporary directory on the local machine.
Checks for an existing scheduled task from previous failed installation attempt where apps were blocked and if found, calls the Unblock-AppExecution function to restore the original IFEO registry keys. This is to prevent from overriding the backup of the original IFEO options.
Creates a scheduled task to restore the IFEO registry key values in case the script is terminated uncleanly by calling the local temporary copy of this script with the parameter - CleanupBlockedApps.
Modifies the "Image File Execution Options" registry key for the specified process(s) to call this script with the parameter -ShowBlockedAppDialog.
When the script is called with those parameters, it will display a custom message to the user to indicate that execution of the application has been blocked while the installation is in progress.
Problem
It happens sometimes that the update is interrupted during the update. As an example, let's assume the computer ran low on battery. Then after reboot, the scheduled task was not removed, causing the application not to launch.
Solution
Redeploy the application to the affected users, this will clean up the scheduled task.
Use the following Powershell commands to clean-up the process. These commands should be run as an administrator.
Last updated