MSIX installation fails on some PCs with 0x80070005 when UAC is enabled – how to install MSIX as administrator?

Manjunath Vadigeri 40 Reputation points
2025-11-13T10:49:52.7566667+00:00

Hi,

I have a .NET MAUI Windows app packaged as an MSIX. On several PCs the MSIX installs without any issues. But on some machines—especially where UAC is enabled—the installation fails with the following error:

App installation failed with error message: Deployment operation failed. (0x80070005)

The same MSIX installs fine on other systems, so the package itself seems correct. The target PCs are Windows 10/11 machines, and the failing ones typically have stricter UAC or group policies.

One important observation: The MSIX installation succeeds on these machines if I run PowerShell in Administrator mode and install using:

Add-AppxPackage

However, I do not want customers to go through this tedious process.

I have a few questions:

  1. What are the common reasons for MSIX installation to fail with 0x80070005 on machines with UAC enabled? (e.g., certificate trust issues, leftover WindowsApps folders, permission restrictions, capabilities requiring elevation, etc.)
  2. What is the recommended or best way to ensure the MSIX installs with administrator permissions when required?
  3. Is there any supported way to make the MSIX trigger elevation?
  4. Are there preferred guidelines from Microsoft for handling MSIX installs on systems with strict UAC policies?
  5. Is there a recommended packaging or deployment approach for MAUI apps to avoid this issue and allow smooth installation for end-users without requiring PowerShell?

Thanks in advance for your help.

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jack Dang (WICLOUD CORPORATION) 3,965 Reputation points Microsoft External Staff Moderator
    2025-11-14T06:43:32.35+00:00

    Hi @Manjunath Vadigeri ,

    Thanks for reaching out.

    Here are answers to your questions:


    1. What are the common reasons for MSIX installation to fail with 0x80070005 on machines with UAC enabled?

    The error 0x80070005 means “Access Denied.” On UAC-enabled machines, this typically happens because:

    1. Permissions - Installing to protected folders like WindowsApps requires admin rights.
    2. Certificate trust - The MSIX package may be signed with a certificate the PC doesn’t trust.
    3. Leftover files - Remnants from previous installations can block a new install.
    4. Capabilities requiring elevation - Some app features may require admin privileges.
    5. Strict policies - Group policies or enterprise settings may prevent installation for standard users.

    In short, it’s usually a mix of permissions, trust, and leftover files.


    2. What is the recommended way to ensure the MSIX installs with administrator permissions when required?

    The most reliable way is to run the installation in an elevated context:

    1. PowerShell as Administrator:
    
    Add-AppxPackage -Path "C:\path\to\your.appx"
    
    
    1. Bootstrapper .exe - a small installer that requests admin rights and then installs the MSIX automatically.

    MSIX itself cannot trigger UAC elevation automatically by double-clicking - you need one of these approaches if admin permissions are required.


    3. Is there any supported way to make the MSIX trigger elevation?

    No. MSIX packages cannot automatically prompt for UAC elevation on their own. If your app requires admin rights, you must either:

    1. Use a bootstrapper .exe that runs elevated and installs the MSIX.
    2. Install via PowerShell in Administrator mode.

    Simply double-clicking the MSIX will not trigger elevation.


    4. Are there preferred guidelines from Microsoft for handling MSIX installs on systems with strict UAC policies?

    While there’s no magic feature to bypass UAC, Microsoft’s guidance is:

    1. Prefer per-user installs whenever possible - these don’t require admin rights and avoid UAC issues.
    2. Ensure the signing certificate is trusted on the target PC.
    3. Clean up leftovers from previous installs to prevent conflicts.
    4. Use enterprise deployment tools like Intune or SCCM in managed environments - they handle permissions and policies automatically.

    https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-prepare

    https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes


    5. Is there a recommended packaging or deployment approach for MAUI apps to avoid this issue and allow smooth installation for end-users without requiring PowerShell?

    1. Per-user MSIX if the app doesn’t need admin privileges - avoids UAC problems.
    2. Bootstrapper .exe if admin rights are required, so it can handle elevation automatically.
    3. Ensure the signing certificate is trusted on all target machines.
    4. For corporate or managed environments, deploy via Intune or SCCM to manage permissions and policy restrictions smoothly.

    In short: package for per-user installs whenever possible, and only use elevation/bootstrapper if absolutely necessary.


    Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.