Skip to content

Commit

Permalink
Environment #56
Browse files Browse the repository at this point in the history
  • Loading branch information
KnifMelti committed Oct 14, 2022
1 parent 2fda71d commit 9e23468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion winget-detect.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $AppToDetect = "Notepad++.Notepad++"
Function Get-WingetCmd {

#Get WinGet Path (if admin context)
$ResolveWingetPath = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe" | Sort-Object { [version]($_.Path -replace '^[^\d]+_((\d+\.)*\d+)_.*', '$1') }
$ResolveWingetPath = Resolve-Path "$env:ProgramFiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe" | Sort-Object { [version]($_.Path -replace '^[^\d]+_((\d+\.)*\d+)_.*', '$1') }
if ($ResolveWingetPath) {
#If multiple version, pick last one
$WingetPath = $ResolveWingetPath[-1].Path
Expand Down

0 comments on commit 9e23468

Please sign in to comment.