WinGet (WinGet method)
Log In or Register to download the BES file, and more.

1 Votes

Description

Installs latest version of WinGet using WinGet.

Property Details

ID27387
StatusBeta - Preliminary testing ready for more
TitleWinGet (WinGet method)
SourceInternal
Source Release Date7/21/2025 12:00:00 AM
Keywordswinget
Added by on 9/16/2025 9:39:24 AM
Last Modified by on 9/16/2025 9:40:13 AM
Counters 1007 Views / 3 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 1 fixlet   * Results in a true/false
Show indented relevance
(name of it starts with "Win" and version of it >= "10.0.16299.0") of operating system and true
Used in 1 fixlet   * Results in a true/false
Show indented relevance
exists key whose (value "DisplayName" of it as string starts with "Microsoft Visual C++ 2015-2022 Redistributable (x64)") of key "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" of native registry and true
Used in 1 fixlet   * Results in a true/false
Show indented relevance
exists files "winget.exe" of folders whose (name of it starts with "Microsoft.DesktopAppInstaller" and name of it ends with "x64__8wekyb3d8bbwe") of folder "C:\Program Files\WindowsApps" and true
Used in 1 fixlet   * Results in a true/false
Show indented relevance
not exists files "winget.exe" whose (version of it >= "1.24.25180.0") of folders whose (name of it starts with "Microsoft.DesktopAppInstaller" and name of it ends with "x64__8wekyb3d8bbwe") of folder "C:\Program Files\WindowsApps"

Actions

Action 1 (default)

Action Link Click here to deploy this action.
Script Type application/x-Fixlet-Windows-PowerShell
# Get winget location that SYSTEM user can access
$wingetPath = (Resolve-Path 'C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe')[-1].Path

# Attempt to install winget using winget
$process = Start-Process $wingetPath -ArgumentList 'install --id Microsoft.AppInstaller --accept-source-agreements --accept-package-agreements' -Wait -PassThru

# If install failed, attempt install with Repair-WinGetPackageManager
if ($process.ExitCode -ne 0) {
    $progressPreference = 'SilentlyContinue'
    Install-PackageProvider -Name NuGet -Force
    Install-Module -Name Microsoft.WinGet.Client -Force -Repository PSGallery
    Repair-WinGetPackageManager
}
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!