Skip to content

Commit 99e9960

Browse files
committed
Update removemsapp.bat
1 parent 84b82d6 commit 99e9960

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

removemsapp.bat

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ echo ====================== & echo.
5757

5858
rem installing dependies and Winget
5959
rem check if Winget is already installed
60-
winget -v 2> nul
61-
IF %ERRORLEVEL% NEQ 0 (
60+
FOR /F %%g IN ('winget -v') do (SET version=%%g)
61+
echo %version%
62+
SET "result=%version:~1%"
63+
SET minwingetversion=1.7
64+
if %result% LEQ %minwingetversion% (
6265
call :InstallWinget
6366
)
6467

@@ -270,7 +273,7 @@ powershell -command $ProgressPreference = 'SilentlyContinue' ; ^
270273
write-host 'Downloading Winget and dependies' ; ^
271274
(New-Object System.Net.WebClient).DownloadFile('https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx', 'Microsoft.VCLibs.x64.14.00.Desktop.appx') ; ^
272275
(New-Object System.Net.WebClient).DownloadFile('https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.3', 'microsoft.ui.xaml.2.7.3.nupkg.zip') ; ^
273-
(New-Object System.Net.WebClient).DownloadFile('https://github.com/microsoft/winget-cli/releases/download/v1.7.11132/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle', 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle') ; ^
276+
(New-Object System.Net.WebClient).DownloadFile('https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle', 'Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle') ; ^
274277
write-host 'Installing Winget and dependies' ; ^
275278
Expand-Archive -Path '.\microsoft.ui.xaml.2.7.3.nupkg.zip' -Force ; ^
276279
Add-AppXPackage -Path '.\microsoft.ui.xaml.2.7.3.nupkg\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx' ; ^

0 commit comments

Comments
 (0)