From a55400c68212ea1579cf9ad8b1fc54fed292432f Mon Sep 17 00:00:00 2001 From: Guofang Date: Fri, 16 Oct 2026 12:56:56 +0800 Subject: [PATCH] Add MSVC 2022 Build Tools installer batch file for the Windows 11 VM Installs the C++ workload through winget; run it as administrator. Co-Authored-By: Claude Sonnet 5.5 --- .../windows11/Install-MSVC2022-BuildTools.bat | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 seediso/windows11/Install-MSVC2022-BuildTools.bat diff --git a/seediso/windows11/Install-MSVC2022-BuildTools.bat b/seediso/windows11/Install-MSVC2022-BuildTools.bat new file mode 100644 index 0000000..c3017b0 --- /dev/null +++ b/seediso/windows11/Install-MSVC2022-BuildTools.bat @@ -0,0 +1,33 @@ +@echo off +setlocal +title Install MSVC 2022 Build Tools + +fltmc >nul 2>&1 +if errorlevel 1 ( + echo Please right-click this file and choose "Run as administrator". + pause + exit /b 1 +) + +where winget.exe >nul 2>&1 +if errorlevel 1 ( + echo winget was not found. + pause + exit /b 1 +) + +echo Installing MSVC 2022 Build Tools with winget (C++ workload, this may take a while)... +winget install --id Microsoft.VisualStudio.2022.BuildTools --exact --source winget ^ + --accept-source-agreements --accept-package-agreements ^ + --override "--passive --wait --norestart --nocache --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" +set "RC=%ERRORLEVEL%" + +if "%RC%"=="0" ( + echo Done. +) else if "%RC%"=="3010" ( + echo Done. A reboot is required to finish the installation. +) else ( + echo winget exited with code %RC%. +) +pause +exit /b %RC%