- Download and install microsoft-ui-xaml
- Download WinGet an License file
- Install WinGet with License
Execute the following in Windows PowerShell (PowerShell 7 doesn't support the Appx module)
#Update versions, see https://github.com/microsoft/microsoft-ui-xaml/releases (grab Microsoft.UI.Xaml Winget may require a specific version)
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -outfile Microsoft.UI.Xaml.appx
Add-AppxPackage -Path .\Microsoft.UI.Xaml.appx
# Select the Winversion you want to install, see https://github.com/microsoft/winget-cli/releases
# set the version with $env:WinGetVer
$env:WinGetVer=1.8.1911
# Download License file, With version bump also update the license file name (see assets)
Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v$env:WinGetVer/fb2830f66c95424aa35457b05e88998a_License1.xml -outfile license.xml
# Download Winget, version bump update als the msixbundle file
Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v$env:WinGetVer/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -outfile Microsoft.DesktopAppInstaller.WinGet.appx
# Install WingetWith License
Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller.WinGet.appx -LicensePath .\license.xml
```
Note I got
0x803fb104 : unknown error
with winget install 9msmlrh6lzf3 --accept-source-agreements --accept-package-agreements (notepads app)