The issue is that some Provisioned Windows applications on Windows 1903 are not working properly as they open briefly and disappear. To troubleshoot this problem, you can check the Application logs in the Event Viewer and look for Event ID 1000 events.
Another option is to examine the Microsoft-Windows-TWinUI/Operational log within the Event Viewer | Application and Services Logs | Microsoft | Windows | Apps, where you may find Event ID 5961 events recorded.
Event Viewer Error Codes
- Event ID: 1000: Exception code: 0xc000027b
- Event ID: 5961: Error code: Unknown HResult Error code: 0x80040904. Activation phase: COM App activation
Some of What I’ve Tried
I attempted to execute the PowerShell script provided and reinstall the affected applications, and although the process seemed to complete without any issues, the problem persists.
$wAppPath = (Get-AppxPackage -Name "*Calc*").InstallLocation;
Add-AppxPackage -Path "$wAppPath\Appxmanifest.xml" -Register -DisableDevelopmentMode;
I’ve tried a few things to solve the problem, including running sfc /scannow and various dism commands, as well as rebooting the system. Unfortunately, none of these attempts have resolved the issue.
Event Viewer Details
Event ID 1000
Faulting application name: Calculator.exe, version: 10.1812.1901.4008, time stamp: 0x5c304989 Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.356, time stamp: 0x0825b5b0 Exception code: 0xc000027b Fault offset: 0x0000000000712cf0 Faulting process id: 0x1518 Faulting application start time: 0x01d568dbe3b0f42c Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.1812.10048.0_x64__8wekyb3d8bbwe\Calculator.exe Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll Report Id: 23d86f95-8eec-407b-b52c-86043d6d0426 Faulting package full name: Microsoft.WindowsCalculator_10.1812.10048.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App
Event ID 5961
Activation for Microsoft.WindowsCalculator_8wekyb3d8bbwe!App failed. Error code: Unknown HResult Error code: 0x80040904. Activation phase: COM App activation
2 Answers
Possible Causes
There can be several factors that can lead to this problem. Here are some of the possible causes:
- Corrupt system files: If some of the system files are damaged, it can cause various issues, including the problem of apps disappearing after launching.
- Outdated or corrupt drivers: If the drivers are outdated or corrupted, it can cause conflicts with the apps and lead to their malfunctioning.
- App-specific issues: Some apps may have their own compatibility issues, which can cause them to disappear after launching.
- Windows updates: Sometimes, Windows updates can cause conflicts with the apps, leading to their malfunctioning.
- Permissions issues: If the permissions for the apps are not set correctly, it can lead to issues like apps disappearing after launching.
Solutions to Fix the Problem
Now that we have a fair idea of the possible causes of the problem, let’s look at some solutions that can help fix the problem:
1. Run the Windows Store Apps Troubleshooter
Windows 10 has a built-in troubleshooter that can help fix issues with Windows Store apps. Here’s how to run it:
- Go to Settings > Update & Security > Troubleshoot.
- Under Find and fix other problems, select Windows Store Apps and click on Run the troubleshooter.
- Follow the on-screen instructions to complete the troubleshooting process.
2. Reinstall the App
If the problem is specific to a particular app, you can try uninstalling and then reinstalling the app. Here’s how to do it:
- Go to Start > Settings > Apps > Apps & features.
- Select the app that is causing the problem and click on Uninstall.
- Once the app is uninstalled, go to the Microsoft Store and reinstall the app.
3. Reset the App
If reinstalling the app doesn’t work, you can try resetting the app. Here’s how to do it:
- Go to Start > Settings > Apps > Apps & features.
- Select the app that is causing the problem and click on Advanced options.
- Under Reset, click on Reset.
- Once the app is reset, try launching it again and see if the problem persists.
4. Run DISM and SFC Scans
If the problem is caused by corrupt system files, you can try running DISM and SFC scans. Here’s how to do it:
- Open Command Prompt as an administrator.
- Type the following command and press Enter:
dism /online /cleanup-image /restorehealth
- Wait for the scan to complete.
- Type the following command and press Enter:
sfc /scannow
- Wait for the scan to complete.
- Restart your computer and try launching the app again.
5. Update or Reinstall Drivers
If the problem is caused by outdated or corrupt drivers, you can try updating or reinstalling the drivers. Here’s how to do it:
- Go to Device Manager.
- Expand the category of the device that is causing the problem.
- Right-click on the device and select Update driver.
- Follow the on-screen instructions to update the driver.
- If updating the driver doesn’t work, right-click on the device and select Uninstall device.
- Restart your computer and Windows will automatically reinstall the driver.
6. Perform a System Restore
If none of the above solutions work, you can try performing a system restore to a previous point in time when the apps were working fine. Here’s how to do it:
- Go to Start > Control Panel > System and Security > System.
- Click on System Protection and then click on System Restore.
- Select a restore point when the apps were working fine and click on Next.
- Follow the on-screen instructions to complete the system restore process.
Conclusion
Apps disappearing after launching can be a frustrating problem, but there are several solutions that can help fix the problem. You can try running the Windows Store Apps troubleshooter, reinstalling or resetting the app, running DISM and SFC scans, updating or reinstalling drivers, or performing a system restore. If the problem still persists, you may need to seek further assistance from a professional.
To fix the issue, one solution is to register the relevant UWP Provisioned Windows apps and their dependencies using PowerShell. The following PowerShell code can be executed as a login script for the affected user account to resolve the issue. It is possible that this solution only needs to be run once to fix the problem for others, but it may be more specific to the individual situation.
I have confirmed that this PowerShell solution can fix the issue with at least two UWP apps, such as Calc and Photos. After analyzing the logic in the Program.cs file on GitHub and running the RegAllAppX.exe located there, I discovered the PowerShell code. However, running the executable file takes too long, especially as the account with the issue gets a new profile each time it logs onto Windows 10 automatically. I suspect DelProf2 is not correctly wiping the profile and causing the problem, but a more native solution is not a priority at the moment, though it may be considered in the future.
By examining the logic in the Program.cs code, one can research, test, and convert it to equivalent PowerShell code to perform similar operations in a more targeted and efficient manner for the specific UWP apps experiencing the problem.
PowerShell
$Apps = @("WindowsCalculator","Photos");
$base = @();
$depend = @();
$Apps | %{
$base += $base = (Get-AppxPackage -Name "*$_*").InstallLocation;
$depend += $depend = (Get-AppxPackage -Name "*$_*").Dependencies.InstallLocation;
};
$Apps = (($base + $depend) | Sort -Unique);
$Apps | %{Add-AppxPackage -Path "$_\Appxmanifest.xml" -Register -DisableDevelopmentMode};
Supporting Resources
- Arrays
- ForEach-Object
Standard Aliases for Foreach-Object: the ‘
%
‘ symbol, ForEach - Get-AppxPackage
- Add-AppxPackage
- You can use the
Register
parameter to install from a folder of unpackaged files during development of Windows® Store apps - You can use
DisableDevelopmentMode
to register an application that is staged by the StagePackageAsync API, has been disabled, or has become corrupted during testing.
- You can use the
- About Assignment Operators
+=
: Increases the value of a variable by the specified value, or
appends the specified value to the existing value. - Sort-Object
Standard Aliases for Set-Alias:
sort
- PackageManager Class