DISM deployed Windows 10 apps wont launch

Solution 1:

Well, it turns out that there was a dependancy required that wasn't installed on the computer I was on. I thought that the DISM command had worked locally but I was using the computer next to it.

So what happened?

In this example, I was trying to deploy the free app, Fresh Paint to all of the computers. I had downloaded it from the Windows Store using Fiddle to snatch the URL.

Running this command in PowerShell shows me some important information:

> Get-AppxPackage *fresh*

Dependencies      : {Microsoft.VCLibs.140.00_14.0.22929.0_x86__8wekyb3d8bbwe,
                  Microsoft.NET.Native.Runtime.1.1_1.1.23406.0_x86__8wekyb3d8bbwe}

So, Fresh Paint has two dependancies, the Visual C library and the .Net runtime.

I accessed a freshly installed machine and downloaded the app again. This time, I noticed that the dependancies are automatically downloaded and installed. I grabbed the URL of the runtimes and dropped them into my deployment folder where I run the script in the question.

Now, each machine automatically installed the dependancies along with the app itself.

It's worth noting that DISM will install an app even if the dependancies are not met. However, its PowerShell counterpart Add-AppxProvisionedPackage checks for dependancies and refuses to install the app. The best way to check that an app will work is to try this command before using DISM.

Finally, I managed to debug the app using the PowerShell fix command that is knocking around the internet:

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Not only does this fix the apps for any users (handy if the 'Uninstall' link has been clicked) but it also output errors for apps that won't install. This pointed me in the right direction for resolving the dependancies and finally getting the app to work.