(Solved) Deployment Failed when Installing APPX Package
When using the Add-AppxPackage PowerShell cmdlet to upgrade/install apps on the Microsoft Store, you can receive the “Add-AppxPackage Deployment failed with HRESULT” error message during the process. This error occurs due to corrupted files that prevent the installation from occurring.
This guide will show you how to fix the “Add-AppxPackage Deployment failed with HRESULT” error.
Workaround: Perform a System Restart
When facing an error with the Windows PowerShell, then performing a simple system restart can be a quick fix. Therefore, as a workaround, you must restart your computer. This way, all the processes, and programs will boot properly and prevent the error from occurring. You can perform the system restart with the step listed below:
- Open the Windows Start Menu by pressing the Win key.
- Click on the Power option and Restart your computer by clicking on the “Restart” option.
1. Run the Windows Store Troubleshooter
Troubleshooter is a built-in feature in Windows. This feature enables your system to detect the problems that cause certain errors to occur on your device. Therefore, you must run the Windows Store Troubleshooter to detect and repair the error. The Windows Store Troubleshooter can be performed as follows:
- Open the Windows Settings by pressing the Win + I keys together.
- Navigate to System > Troubleshooter.
- Scroll down and click on the “Windows Store App” option at the end.
- Run the Windows Store Troubleshooter by clicking on the “Run the troubleshooter” option.
- After the problems have been detected, choose the solution as per your choice (For example resetting the Windows Store App to fix the issue).
2. Disable the StartMenuExperienceHost EXE File
Although the StartMenyExperienceHost EXE File is used for managing the Windows Start Menu, it is known to interfere with PowerShell commands. Therefore, you must disable this file before running the command at fault in PowerShell. With the steps below, you can disable the StartMenyExperienceHost EXE File:
- Open the Windows Start Menu by pressing the Win key.
- Type “PowerShell” in the search box.
- Right-click on it and select the “Run as an administrator” option.
- Now, copy and paste the following command into the PowerShell and press the Enter key:
- Right-click on the Windows Start Menu and select the “Task Manager” option.
- Click on the “Details” tab and look for the StartMenyExperienceHost EXE File.
- Open its file location by right-clicking on it and selecting the “Open file location” option.
- Right-click on the EXE file and select the “Cut” option.
- Paste the file into a different Folder by pressing the Ctrl + V keys together.
- Right-click on the Windows Start Menu and select the “Task Manager” option.
- Right-click on the EXE file and select the “End task” option.
- Type the command at fault into PowerShell and press the Enter key.WARNING: After the command has been completed, you must paste the EXE file back to its default folder where you copied it from. If you are unable to do so, your entire Start Menu and Taskbar will break.
Check to see if the issue is resolved or not.
3. Run the System Scans
System file corruption is one of the major causes of this error. It prevents certain actions to be performed by the programs. Therefore, to make sure this doesn’t happen, you must run System Scans that will detect and repair the error found in the system files. Following the steps below, you will see how to repair damaged files through system scans:
- Open the Windows Start Menu by pressing the Win key.
- Type “cmd” in the Windows Search bar.
- Run the command prompt as an administrator by right-clicking on it and selecting the”Run as an administrator” option.
- Type the following command in the Command Prompt while giving a space between “sfc” and “/.”
sfc /scannow
- the file checker automatically repairs the damaged files after scanning.
- Paste the following command into the command prompt and press the Enter key to perform the DISM scan:
Dism.exe /online /cleanup-image /restorehealth
- Restart your computer and make the necessary changes.
4. Update your Windows
An outdated Windows prevents certain programs from executing properly. It can also be a leading factor in the occurrence of this error. Therefore, you must keep your Windows updated to prevent such errors from taking place. Follow the instructions given below to update your Windows to the latest version:
- Open the Windows Settings by pressing the Win + I keys together.
- Navigate to Update and Security > Windows Update.
- Click on the “Check for Updates” option.
- After the Windows update is found, download it by clicking on the Download option on the page.
- Restart your system to make the necessary changes.
- Go to the Official Microsoft Web Page.
- Download the latest Windows Update by clicking on the “Update Now” option.
- Install the update by clicking on the “Update Now” option on the Windows Update Assistant page.
- After the installation is completed, restart the computer by clicking on the Restart option.
5. Run the System on Safe Mode
If the error still persists, then you must run the system on Safe Mode. After booting the system on Safe Mode, your system will start with a minimal set of drivers and default programs. You can run the system on Safe Mode as shown below:
- Open the Run Command by pressing the Win + R keys together.
- Type “msconfig” in the search box and click OK to open System Configuration.
- Open the Boot tab and check the “Safe Mode” box.
- Click on “Minimal” under Safe Mode.
- Set the timer as per your choice and Click Apply and OK.
- Restart your computer by selecting the “Restart” option on the System Configuration Prompt.
- Once the system is booted into Safe Mode, you must run the PowerShell.
- Open the Windows Start Menu by pressing the Win key.
- Type “PowerShell” in the search box.
- Right-click on it and select the “Run as an administrator” option.
- Now, type the command that was facing the error, for example:
$manifest = (Get-AppxPackage Microsoft.WindowsStore).InstallLocation + '\AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest)
6. Use In-Place Upgrade
In-Place Upgrade is a tool that allows you to upgrade your Windows while still keeping your files and other data intact. As a last resort, you must use In-Place Upgrade to repair command-line errors.
- Open the Official Microsoft Website.
- Download the tool by clicking on the “Download Now” option under “Create Windows 10 installation media.”
- Select the folder you want to download the file from and select the Save option.
- Click on the Three dots at the top right part of the browser and open the Downloads page.
- Locate the file by clicking on the” Show in Folder” option.
- Open the EXE file by right-clicking on it and selecting the “Open” option.
- Click “YES” on the User Account Control Prompt to confirm the actions.
- Accept the terms and conditions by clicking on the “Accept” option.
- Select the “Upgrade this PC Now” option on the “What do you want to do now” page.
- Install the Setup by clicking on the “Install” option.
- Select your sign-in account after the installation.
- Choose the privacy settings for your device and click on the “Accept” option.
- Use Cortana by clicking on the “Use Cortana” option.
- This will open the Windows Sign-in Screen.