Skip to content

Instantly share code, notes, and snippets.

@wildy5588
Last active August 3, 2024 03:10
Show Gist options
  • Save wildy5588/4733b559fc1422e6563070ef2a46bd1c to your computer and use it in GitHub Desktop.
Save wildy5588/4733b559fc1422e6563070ef2a46bd1c to your computer and use it in GitHub Desktop.
Guides to install Winget in Windows 10 and 11
# >> Create temporary folder
mkdir C:\tempfol
cd C:\tempfol
# >> Enable Protocol TLSv1.2 and SSLv1.3
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls, [Net.SecurityProtocolType]::Tls11, [Net.SecurityProtocolType]::Tls12, [Net.SecurityProtocolType]::Ssl3
[Net.ServicePointManager]::SecurityProtocol = "Tls, Tls11, Tls12, Ssl3"
# >> Install VCLibs
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile .\VCLibs.appx
Add-AppxProvisionedPackage -Online -PackagePath .\VCLibs.appx -SkipLicense
# >> Install Microsoft UI Xaml 2.8.6
Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.8.6 -OutFile .\microsoft.ui.xaml.2.8.6.zip
Expand-Archive .\microsoft.ui.xaml.2.8.6.zip
Add-AppxProvisionedPackage -Online -PackagePath .\microsoft.ui.xaml.2.8.6\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.8.appx -SkipLicense
# >> Install Winget v1.8.1911
Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.8.1911/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -OutFile .\winget.msixbundle
Invoke-WebRequest -Uri https://github.com/microsoft/winget-cli/releases/download/v1.8.1911/76fba573f02545629706ab99170237bc_License1.xml -OutFile .\winget.license.xml
Add-AppxProvisionedPackage -Online -PackagePath .\winget.msixbundle -LicensePath .\winget.license.xml
# >> Change WindowsApps permissions
TakeOwn /F "C:\Program Files\WindowsApps" /R /A /D Y
IcaCls "C:\Program Files\WindowsApps" /grant Administrators:F /T
# >> Remove tempfoi directory
cd ..
rm -r tempfol
@wildy5588
Copy link
Author

Update winget to v1.8.1911

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment