Identify any prerequisite AppX packages that are installed by your App installer. For instance, look for commands like this in the installer PowerShell script:
Add-AppxPackage -Path <something>
Or if your installer package contains a Dependencies folder, it may be sufficient to inspect the contents of that folder. There is no simple, clear path to determining the specific AppX packages that are included as prerequisites, so you may need to do some investigation to determine them.
Your list might look like this, for instance:
Microsoft.NET.CoreRuntime.1.1.appx
Microsoft.VCLibs.x64.14.00.appx
Microsoft.VCLibs.x86.14.00.appx
Once you have a list of dependent AppX packages, you need to repair/reinstall some or all of them after each reboot. Manually test this command for each package to determine which need to be fixed:
Get-AppXPackage *Microsoft.NET.CoreRuntime.1.1* | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Now that you have the commands you need to run to fix your App, you can build this as a CMD file that a user has to run manually, or as some manner of login script. For instance, you could just put a BAT file in
c:\programdata\microsoft\windows\start menu\startup that would run on each user's login.
Batchfile:
@echo off
start /min powershell.exe "
c:\fix.ps1"
fix.ps1:
Get-AppXPackage *Microsoft.VCLibs* | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
Get-AppXPackage *Microsoft.NET.CoreRuntime.1.1* | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
(Note the * chracters which do wildcard matching to allow you flexibility. The line for Microsoft.VCLibs, for instance, captures both the x64 and x86 packages.)
Problem Cause
This appears to happen when a Store or Sideload App installs AppX packages as prerequisites. Although the Store or Sideload App itself is still functional, the prerequisite AppX package is missing after the reboot. Something important did not get captured in the User Layer.