Update Get-WingetCmd.ps1
parent
c4113ea29e
commit
7dc62baec5
|
@ -3,7 +3,7 @@
|
|||
Function Get-WingetCmd {
|
||||
|
||||
#Get WinGet Path (if admin context)
|
||||
$ResolveWingetPath = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe" | Sort-Object -Property {$_.Path -as [int]}
|
||||
$ResolveWingetPath = Resolve-Path "C:\Program Files\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
|
||||
|
|
Loading…
Reference in New Issue