# Script or Company App Install Fails Because a File Is Missing

> Fix a script or Company App that ends in Failed install because a file it uses was never uploaded under Source Files.

Source: https://docs.capaone.com/capaone/troubleshooting/script-or-company-app-install-fails-because-a-file-is-missing/  
Product: CapaOne — a separate CapaSystems product; do not apply this page to any other.

## Problem

A script or Company App assigned to Windows endpoints goes through the usual installation statuses
and then ends in **Failed install**. The same script or app may have worked before, or it may fail
on every endpoint it's assigned to.

## Cause

The script or app uses a file that isn't uploaded under **Source Files**. For example, a script
copies a shortcut to the endpoint with the **Copy File** PowerBrick, but the shortcut was never
added to the script, or was removed later. CapaOne has nothing to send to the endpoint, so the
installation fails.

## Solution

1. Go to **Windows → Applications** and open the **Company Apps** or **Scripts** tab.
2. Open the row menu for the script or app and select **View content**. Note which files are
   listed.
3. Open the script or app and review its PowerBricks. Compare the files the bricks use, for example
   in **Copy File** or **Download Content**, with the files listed in step 2.
4. Select **Edit**, then use **Modify Content** under **Source Files** to add the missing files.
   Save the changes.
5. Open the **Endpoints** tab and select **Redeploy** for each endpoint that failed.

The endpoint shows **Up to date** when the installation succeeds.

## Related

- [Create a Script](/capaone/application-manager/create-a-script/)
- [Create a Company App](/capaone/application-manager/create-a-company-app/)
- [Assign and Redeploy Windows Applications](/capaone/application-manager/assign-and-redeploy-windows-applications/)
- [Application Update Stays Failed](/capaone/troubleshooting/application-update-stays-failed/)
