Repair Your Windows Store and Metro Apps After Windows Update

Background

Sometimes after updating  Windows 10, the Windows Modern UI / Metro Apps no longer works.  You could try starting any of them, such as Calculator, Photo, or Microsoft Store - and after opening a  blank window it will just close. This has happened several times, twice in my wife's laptop, and once in our home Desktop PC. This post will try to give few options to solve this problem. But I still don't know what caused it.

Step 1. Assess condition of installed VCLib Packages

Open up Powershell by pressing Windows Key and typing Powershell. Click Run as administrator if it is shown (if not, right click on the Powershell icon first).
Type :
Get-AppxPackage Microsoft*VC* | Select InstallLocation

The result will be the location where VCLibs packages were installed. We concern only the VCLibs 140 version without UWPDesktop in the package names. 

Try to check the files of the installed VCLibs packages (we need to do this twice, once for the x86 and the second for the x64).

cd "C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.27323.0_x64__8wekyb3d8bbwe"
dir

If several files has 0-bytes length, then you know that this is the reason why Windows Modern UI apps no longer works.

I also found a case where there is a missing file in the directory (instead of 0-bytes file), which is harder to detect. For this I will write another blog post.

Step 2. Download replacement packages

If the corrupt installed version is 27323,  we could solve the situation by installing newer version of VCLibs. In order to get url to download the newer package, try opening Windows Calculator store page : https://www.microsoft.com/en-us/p/windows-calculator/9wzdncrfhvn5 
Then we need help to get the urls, open up   https://store.rg-adguard.net/ and paste the windows calculator url.
From there we get VCLibs version 27810 or higher : the x64 version :  Microsoft.VCLibs.140.00_14.0.27810.0_x64__8wekyb3d8bbwe.appx 
Store the resulting appx files in your Downloads directory or somewhere that is easy to access.

As alternative, you could get the existing VCLibs package directory from a healthy Windows 10 PC/Laptop. Be mindful that even admininstrator-level user could not replace package files manually without changing many directory permissions, so this options is keep for last resort only.

Step 3. Install replacement packages

Back using the powershell, execute these commands :
cd C:\Users\\Downloads
Add-AppxPackage .\Microsoft.VCLibs.140.00_14.0.27810.0_x86__8wekyb3d8bbwe.Appx
Add-AppxPackage .\Microsoft.VCLibs.140.00_14.0.27810.0_x64__8wekyb3d8bbwe.Appx

Done!
Complications could happen if your corrupt VCLibs package is higher than 27810, therefore you cannot upgrade to 27810, and you also will not be able to reinstall 27810. If that is the case, borrowing from technique from https://www.vacuumbreather.com/index.php/blog/item/89-the-case-of-corrupted-store-apps, we could override the package's state to be not OK before installing the Appx package. The steps are :
a. Push Windows Button -> type regedit -> choose Registry Editor
b. Navigate to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModel\StateChange\PackageList\
c. Right click on package list, create a new folder with package full name, example : "Microsoft.VCLibs.140.00_14.0.27323.0_x64__8wekyb3d8bbwe"
d. Right click on the new folder, create a new DWORD key, rename it to PackageStatus
e. double click on the PackageStatus and set 2 as the value
f. install!
 Add-AppxPackage .\Microsoft.VCLibs.140.00_14.0.27810.0_x64__8wekyb3d8bbwe.Appx

Question: Why, couldn't we repair windows in this case? It seems that the WindowsApps directory it not part of the files registered to System File Checker, and also in order to get the package recognized by windows it involves some kind of registry but not in Windows Registry. These condition is too complicated for the system file checker to handle, so it is not designed to check for these problems.

Conclusion

To fix Windows Metro Apps not running, try to upgrade Microsoft VCLibs library by installing newer version of the library or try to reinstall the library if the latest version is already installed.

Comments

MihaiA said…
hello,I've done the steps,now there are two Vclibs Directories one is C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.27810.0_x64__8wekyb3d8bbwe
and one
C:\Program Files\WindowsApps\C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.27323.0_x64__8wekyb3d8bbwe

The Microsoft store isn't open still.
Aren't there any conflicts,Maybe?
Thankx!
yudhiwidyatama said…
Hi, There is a possibility that another package (not VCLibs) needs repair.
Check the dependencies using :

Get-AppxPackage Microsoft.WindowsStore | Select-Object -ExpandProperty Dependencies | Select PackageFullName

PackageFullName
—-------------
Microsoft.NET.Native.Framework.2.2_2.2.27912.0_x64__8wekyb3d8bbwe
Microsoft.NET.Native.Runtime.2.2_2.2.27328.0_x64__8wekyb3d8bbwe
Microsoft.VCLibs.140.00_14.0.27810.0_x64__8wekyb3d8bbwe
Microsoft.WindowsStore_11912.1001.1.0_neutral_split.scale-100_8wekyb3d8bbwe
Microsoft.WindowsStore_11912.1001.1.0_neutral_split.scale-150_8wekyb3d8bbwe

Then do the same steps like in the post using Microsoft.NET.Native.Framework* and Microsoft.NET.Native.Runtime* as starting package name.
MihaiA said…
This comment has been removed by the author.
MihaiA said…
This comment has been removed by the author.
MihaiA said…
This comment has been removed by the author.
MihaiA said…
Hello,I gave up and used another solution (which I did find on a Microsoft forum) which worked,and installed MediaCreationTool1909.exe from https://download.microsoft.com/download/c/0/b/c0b2b254-54f1-42de-bfe5-82effe499ee0/MediaCreationTool1909.exe
Thank's a lot!
this is really nice to read..informative post is very good to read..thanks a lot!
data science course in malaysia

Popular posts from this blog

Long running process in Linux using PHP

Reverse Engineering Reptile Kernel module to Extract Authentication code