Open ZaxLofful opened 4 months ago
I made a small PowerShell script that will install what is needed:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
$progressPreference = 'silentlyContinue'
$latestWingetMsixBundleUri = $(Invoke-RestMethod https://api.github.com/repos/microsoft/winget-cli/releases/latest).assets.browser_download_url | Where-Object {$_.EndsWith(".msixbundle")}
$latestWingetMsixBundle = $latestWingetMsixBundleUri.Split("/")[-1]
# Define the output directory to the user's main directory
$outputDir = "$Env:USERPROFILE"
Write-Information "Downloading winget to user's main directory..."
Invoke-WebRequest -Uri $latestWingetMsixBundleUri -OutFile "$outputDir\$latestWingetMsixBundle"
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile "$outputDir\Microsoft.VCLibs.x64.14.00.Desktop.appx"
Add-AppxPackage "$outputDir\Microsoft.VCLibs.x64.14.00.Desktop.appx"
Add-AppxPackage "$outputDir\$latestWingetMsixBundle"
When launching on a fresh build of Win 11, there is a winget warning that it needs to be updated.
Have PowerShell update winget right from the beginning, or have it done in the batch file prior to just launching.