# 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:

1. Makes a copy of this script in a temporary directory on the local machine.
2. 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.
3. 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.
4. Modifies the "Image File Execution Options" registry key for the specified process(s) to call this script with the parameter -ShowBlockedAppDialog.
5. 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

1. Redeploy the application to the affected users, this will clean up the scheduled task.
2. Use the following Powershell commands to clean-up the process. These commands should be run as an administrator.

```powershell
Install-module PSADT
Import-module PSADT
Unblock-AppExecution
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.scappman.com/applications/my-applications-cant-be-opened-after-an-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
