HOWTO install ‘winget’ from command line

Sometimes we might need to use the amazing ‘winget’ command where it isn’t available (for example from a Windows Sandbox, …).

The few steps below will solve this problem.

The installation process

To install ‘winget’ command, you will need to download C++ Runtime framework packages for Desktop Bridge from MS, selecting the proper package (x86, x64, …) from the ‘How to install and update Desktop Framework packages’ section.

    • current x64 package link: https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx
    • current x86 package link: https://aka.ms/Microsoft.VCLibs.x86.14.00.Desktop.appx

Then download ‘winget’ client package from its Github repository.

    • current package link: https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle

Open a PowerShell Prompt with administrative rights in the folder where you saved the files and:

  • install Desktop Framework Package by typing:
    Add-AppxPackage <downloaded file name: Microsoft.VCLibs…>.appx
  • finally install ‘winget’ client package by typing:
    Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle

It’s done.