Fix: “AppxPackage: The Remote Procedure Call Failed” Error in Windows
The error “AppxPackage: The Remote Procedure Call Failed” often occurs when you attempt to remove or manage apps using PowerShell. This is primarily caused by issues with the Remote Procedure Call (RPC) service, a crucial component for performing key Windows operations. When this service is not running or is misconfigured, it disrupts app removal or installation processes. Another potential cause is problems with the Windows registry, where missing or corrupted entries can stop commands like AppxPackage from working as intended.
Outdated Windows versions, incomplete updates, or issues with the AppX Deployment Service may also trigger this error, especially when the system fails to properly handle app packages. A corrupted user profile can likewise cause problems with app removal or executing certain commands.
1. Verify and Restart the Remote Procedure Call (RPC) Service
- Press Win + R, type
Services.msc
, and hit Enter. This will open the Services window. - Scroll to find Remote Procedure Call (RPC) in the list.
- Ensure that its Status is Running and the Startup Type is set to Automatic.
- If it’s running, right-click and select Restart. If it’s stopped, right-click and select Start.RPC is a critical service with many dependencies, usually protected to prevent accidental misconfigurations. If you find it’s stopped or not set to Automatic, you can safely adjust it to ensure functionality.
- Click OK to save any changes, close the Services window, and restart your system to apply the fix.
2. Run PowerShell with Elevated Permissions
Running PowerShell with elevated permissions ensures that you have full access to modify system settings or uninstall apps, which might otherwise be blocked by permission issues.
- Press Win + X and select Windows PowerShell (Admin) or Command Prompt (Admin) from the menu.
- If prompted by User Account Control, click Yes to allow it.
- Once PowerShell opens, enter your desired command and press Enter.
After executing this, try the AppxPackage
command again. If the issue persists, proceed to the next step.
3. Use Safe Mode to Remove the Appx Package
Booting your computer into Safe Mode can help troubleshoot and resolve issues by loading only essential drivers and services, avoiding conflicts with third-party apps and software. If you’re still experiencing the “AppxPackage: The Remote Procedure Call Failed” error, Safe Mode may allow the system to remove the app.
- Press Win + R, type
msconfig
and hit Enter. - In the System Configuration window, go to the Boot tab.
- Check the Safe boot option and select Minimal.
- Click OK, then Restart your PC when prompted.
- After your PC restarts in Safe Mode, try executing the
AppxPackage
command again.
To Exit Safe Mode, repeat these steps and uncheck the Safe boot option, then restart your system. If you still don’t understand, you can try our detailed guide on how to exit safe mode in Windows.
4. Reset or Reinstall Problematic Windows Applications (Optional)
If the app is installed and causing issues, consider resetting or reinstalling it via the Apps & Features settings.
- Open Settings and navigate to Apps > Apps & Features/Installed Apps.
- Click on the app and select Advanced options.
- If you see a Reset button, click it to restore the app to its default state, possibly resolving the error.
- If resetting doesn’t work, uninstall and reinstall the app through the Apps & Features menu.
5. Check System Integrity with SFC and DISM Tools
Sometimes, system integrity issues can cause the “AppxPackage: The remote procedure call failed” error. Running the built-in SFC (System File Checker) and DISM (Deployment Imaging Service and Management Tool) can fix corruption in system files and the Windows Image, potentially unblocking the app removal process.
Run SFC Tool:
- Press
Win + X
and select Command Prompt (Admin) or Windows PowerShell (Admin) to open with administrator rights. - In the Command Prompt, type the following command and press Enter:
sfc /scannow
- Wait for the scan to finish. This will automatically fix any corrupted system files it detects.
- Restart your PC if it finds any corrupted files.
Run DISM Tool:
- If the SFC tool didn’t resolve the issue, open Command Prompt (Admin) again.
- Type the following command and press Enter:
DISM /Online /Cleanup-Image /RestoreHealth
- Wait for DISM to repair the system image. This process might take several minutes.
- Once done, restart your system and check if the issue persists.
6. Create a New User Profile
If none of the previous steps have fixed the issue, a corrupted user profile might be the root cause. Sometimes, errors like “AppxPackage: The remote procedure call failed” only appear on a specific user profile due to profile corruption. Creating a new user profile can help test if the issue is tied to your current profile.
- Open Settings by pressing
Win + I
. - Go to Accounts and select Other users.
- Under Other users, click Add Account.
- Follow the prompts to create a new Microsoft account or a local user account.
- After creating the account, click on the account and Change account type.
- Change the account type from Standard User to Administrator.
- Sign out of your current profile and sign in to the new one.
- Try running PowerShell to see if the error still occurs.
If the issue is resolved on the new profile, your original profile might be corrupted, and you can transfer your data to the new account.
7. Check System Language and App Bundles
If your system uses a non-English language or has specific regional settings, app bundles might be complicating the removal or installation process. To address this, use the -PackageTypeFilter
parameter with PowerShell to target all components of the app, including its bundles.
Command:
Get-AppxPackage -AllUsers -Name "*appname*" | AppxPackage -AllUsers -Confirm
This command ensures that all related app bundles are included for removal. Remember to replace appname with the actual name of the app you’re facing issues with.
8. Use SetACL Tool (For Advanced Users Only)
If the Remote Procedure Call service is running but you still face issues, it might be due to third-party tools corrupting or misconfiguring registry entries linked to AppX packages. This step is for advanced users, as this error often appears after using cleanup software or the system file checker. Corrupted files can disrupt the process, leading to the “Remote Procedure Call Failed” issue. For this, we’ll use the SetACL tool.
SetACL is a command-line utility for managing file and registry permissions on Windows. It allows advanced control over access control lists (ACLs) and can modify permissions, ownership, and auditing settings for files, directories, and registry keys.
In this instance, SetACL repairs the “Remote Procedure Call Failed” error by providing necessary permissions to a specific registry key that may be locked or incorrectly configured. By executing these commands, SetACL modifies access control entries (ACE) for that key, enabling the system to perform the required actions without permission issues.
This process ensures that the system has full access to the needed registry entries, thereby resolving the error that prevents smooth operations.
First, we’ll create a registry key if it doesn’t already exist:
- Press
Win + R
to open the Run dialog. - Type
regedit
and press Enter to open the Registry Editor. - Click
Yes
on the User Account Control Prompt if it appears. - Navigate to the following path:
HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage
- Search for the folder named
winstore_cw5n1h2txyewy
under Storage. If it’s missing, create it:- Right-click on
Storage
, click New, then Key. - Name the new key
winstore_cw5n1h2txyewy
.
- Right-click on
- After creating the key, close the Registry Editor.
Apply Permissions Using SetACL Tool: (a Windows manipulation tool)
- Download the SetACL tool from the official website.
- Once the download is complete, extract the files and copy the appropriate version (32-bit or 64-bit) based on your operating system.
- Copy the downloaded files to the C:\Windows\System32 folder.
- Press Win + S, type CMD, and select “Run as administrator” to open Command Prompt.
- Run the following command in the Command Prompt:
SetACL -on "hkcu\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\winstore_cw5n1h2txyewy" -ot reg -actn ace -ace "n:S-1-15-2-2608634532-1453884237-1118350049-1925931850-670756941-1603938316-3764965493;p:full;i:so,sc;m:grant;w:dacl"
- After executing the command, restart your PC to apply the changes.
After restarting, try again. Hopefully, this will resolve your problem. Good luck!