New
#90
[Based on slicedice method]
This command $pn = Get-AppxPackage (Microsoft.WindowsStore).PackageFullName did not work in my case so, using image [MR} I found location of \AppxManifest.xml. It was
C:\Program Files\WindowsApps\Microsoft.WindowsStore_11712.1001.20.0_x64__8wekyb3d8bbwe\AppxManifest.xml
Using it I executed in sequence (powershell prompt, as administrator):
It worksCode:PowerShell -ExecutionPolicy Unrestricted Add-AppxPackage -DisableDevelopmentMode -Register "C:\Program Files\WindowsApps\Microsoft.WindowsStore_11712.1001.20.0_x64__8wekyb3d8bbwe\AppxManifest.xml" exitThanks guys! It Worked here too :)Yep, my solution does exactly the same thing. As stated, I separated the code for short one liners, for easy copy paste.
The real difference is that with hard coded paths to a specific store version, the solution works only for that store version. What if the version changes? What if someone is running 32-bit Windows?
Glad you got it working!