winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

where are windows server 2022 installation instructions?

Open greyltc opened this issue 1 year ago • 5 comments

Hi. The readme says:

https://github.com/microsoft/winget-cli/blob/f1ae1267c330f7ec463a58fc6c7b0e2ea6f44a16/README.md?plain=1#L16

I'm glad to hear that installation on windows server 2022 "may be possible." What steps should I take to test if it's possible for me?

greyltc avatar May 23 '24 19:05 greyltc

After doing some more searching, I think this issue is a duplicate of https://github.com/microsoft/winget-cli/issues/438 which has seemingly been closed as a "won't fix" if I understand correctly (issue marked closed & docs are non-existent).

I think it's a bit strange to dangle the possibility of installation on windows server 2022 in the readme, then make it a secret out of how to actually do it.

greyltc avatar May 23 '24 19:05 greyltc

There are a couple of different options. Users should also be aware that WinGet distributed through the App Installer is considered a Windows System component which means once it's been added to Windows Server 2022, removal is not supported.

One method is the instructions at Microsoft Learn for bootstrapping WinGet in the Windows Sandbox. The other method is using the Repair-WinGetPackageManager PowerShell cmdlet inside the Microsoft.WinGet.Client PowerShell module.

$progressPreference = 'silentlyContinue'
Write-Information "Downloading WinGet and its dependencies..."
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx
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.2.8.x64.appx
Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx
Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx
Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle

denelon avatar May 24 '24 19:05 denelon

Hi @denelon I followed your suggestion above and received an error about missing license.

image

tristanbarcelon avatar Jun 22 '24 21:06 tristanbarcelon

A non Microsoft approach is Bit.ly/winget-install

Works for unsupported OS like Windows Server 2022 and 2019.

Karl-WE avatar Nov 17 '24 09:11 Karl-WE

I updated winget on Server 2022 using later version of winget-install and it borked the winget cli. Incidentally, Microsoft.Winget.Client still works.

tristanbarcelon avatar May 14 '25 19:05 tristanbarcelon