powershellmsixdism

MSIX install fails - C1570108 Msg:[Policy check failed]


We have an MSIX installer that we use for installing applications that we have developed. We have a customer that is trying to roll out the applications across their computers.

When they run the MSIX by double clicking it, everything works and it installs correctly. It also works when running the Powershell command:

Add-AppxPackage "C:\localdata\package.msix"

However, this only installs for the current user and they need the applications installed for all users. They are therefore using Powershell to install the MSIX for all users on the computer using the command:

Add-AppxProvisionedPackage -Online -PackagePath "C:\localdata\package.msix" -SkipLicense

This command fails with the message "The package does not meet the requirement for provisioning to the target image". When looking at the log file, it produces the errors below:

Error DISM DISM Appx Provider: PID=4668 TID=16512 onecore\admin\appmodel\utilities\provisionhelper\msixpackageadapter.cpp(629)\AppxProvider.dll!00007FFC8C374ED3: (caller: 00007FFC8C3745C3) ReturnHr(1) tid(4080) C1570108 Msg:[Policy check failed] CAppxManager::ResultLoggingCallback Error DISM DISM Appx Provider: PID=4668 TID=16512 onecore\admin\appmodel\utilities\provisionhelper\msixpackageadapter.cpp(348)\AppxProvider.dll!00007FFC8C37468E: (caller: 00007FFC8C36F159) ReturnHr(2) tid(4080) C1570108 Msg:[Pre-install policy check failed for package 'TotalControlSimulator_1.2.0.1045_x64__0mjrefxxwjek0'.] CAppxManager::ResultLoggingCallback

The error appears to be related to a policy check, but there are no details on what policy might be failing or why. Searching for the error code (C1570108) didn't provide anything useful.

How do I troubleshoot this or get more information on what policy check is failing?


Solution

  • The customer had an incorrect setup in their registry. They had

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Appx\AllowAllTrustedApps
    

    set incorrectly. When they changed this to being a Dword and setting the value to 1 it worked as expected.