Some background: On a Windows 10 machine I had to recreate an existing user profile due to some corruption. I followed this guide (except for the step related to ProfileGuid in the registry, since it does not exist in Windows 10):
Everything worked great and I was able to log on. However I quickly realized none of the built in Windows Apps worked. They would open and then very quickly close without any error message window.
Each of these apps could be fixed quite easily using the Start Menu -> type: Apps -> launch Apps & features. Find the problematic app, click Advanced options. First choose the Terminate button. Then choose the Reset button. The app then worked without crashing instantly.
However this same issue occurred with Microsoft Store, but that app unfortuantely is not in the Apps & features list.
Event viewer did have information for these crashes. For example
Faulting application name: WinStore.App.ex Faulting module name: KERNELBASE.dll, version: 10.0.19041.3758 Exception code: 0xc000027b Fault offset: 0x000000000012db22 Faulting application start time: 0x01da427eb19954ed Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsStore_22311.1401.2.0_x64__8wekyb3d8bbwe\WinStore.App.exe Faulting module path: C:\Windows\System32\KERNELBASE.dll Faulting package full name: Microsoft.WindowsStore_22311.1401.2.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App
I tried to reset Microsoft Store using Start menu -> type: wsreset utility. However that failed and would generate the error -2147219196 related to PurgeCaches.
I also tried uninstalling and reinstalling Microsoft Store via PowerShell. Each of these was successful but didn’t fix the problem.
Finally I stumbled on this article:
This helped me resolved the issue and you can follow these quick steps:
- Uninstall Microsoft Store using PowerShell (admin):
get-appxpackage *WindowsStore* | remove-appxpackage
- Start Menu -> type: Apps -> launch Apps & features
- Uninstall Xbox app
- Uninstall Xbox Live app
- Reinstall Xbox app via this link https://aka.ms/XboxInstaller
- Launch Xbox app
- At the top you should see a notification that Microsoft Store is needed.
- Click it to install Microsoft Store using the Xbox App
- Once complete, Microsoft Store should now be functional!