Install Apps from the Microsoft Store using WinGet (Programmatically)

In a previous article I was quite excited that Windows finally gets a package manager. Not only that it’s open source, but it also supports every single Windows 10 installation down to 1709.

Recently, Microsoft added an experimental feature to the WinGet command-line tool to also install apps from the Microsoft Store.

The cool thing about WinGet is that you can use it with CMD, PowerShell, and also the latest Terminal released by Microsoft.


Enable support for Microsoft Store apps


As mentioned, for the moment, the ability to install Store Apps via the WinGet tool is experimental, and to test it, we must perform some changes.

In your preferred editor (CMD, PowerShell, etc), type:

winget settings , and hit Enter

A file settings.json will be opened in notepad. The file contains all the settings for the Windows Package Manager.

Under the commented lines (//) paste the following code:

“experimentalFeatures”: {
“experimentalMSStore”: true

After you added the lines in the settings.json, save the file (CTRL+S) and close notepad. At this point, you should have Microsoft Store as a source.

To check the sources from where WinGet receives/searches for packages, type the following command:

winget source list

If msstore appears in the list, it means that you have access to the Microsoft Store as well.


Install an app

Next, you can search, show, and install packages using WinGet. All the commands can be found on Microsoft website.

For example, we can install Python 3.9 from the Microsoft store using:

winget install “Python 3.9”

The cool thing is that, if you have the Store opened and you install a package via WinGet, the progress is also shown in the Microsoft Store.


Some mentions

As mentioned, the Microsoft Store integration is experimental. Microsoft only added 290 applications (all rated E and free) to the WinGet list.

To find out all the applications from the MS Store which can be installed via WinGet, you can use the following command:

winget search | findstr mssto | more

It’s yet unclear how many Store applications will be included in WinGet after the feature comes out of the experimental stage, and it’s still unclear if paid apps can be installed programmatically (probably not).

Windows Package Manager is starting to get some shape, and more and more apps are added to the repos every day, but it’s still a long way to go until WPM becomes something easy to use and useful. Keep in mind that, for the moment, you can only install applications via WinGet. You CANNOT upgrade or uninstall any packages with WinGet, but we will see in the future what Microsoft adds to the features list.

As a last note, I found a cool 3rd party GUI for WinGet called HandyWinGet. This can be found on GitHub here.

Leave a comment

Your email address will not be published. Required fields are marked *

eight − 7 =