Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
xansec committed Aug 22, 2024
1 parent ad9f232 commit d5b4702
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/install_vs_buildtools.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ setlocal
REM Define the Visual Studio Build Tools URL, installer name, and log file path
set VS_BUILD_TOOLS_URL=https://aka.ms/vs/17/release/vs_BuildTools.exe
set VS_BUILD_TOOLS_INSTALLER=vs_BuildTools.exe
set LOG_FILE=%~dp0vs_buildtools_install.log

REM Download the Visual Studio Build Tools installer
echo Downloading Visual Studio Build Tools...
Expand All @@ -18,10 +17,10 @@ if not exist %VS_BUILD_TOOLS_INSTALLER% (

REM Install Visual Studio Build Tools with the Desktop development with C++ workload
echo Installing Visual Studio Build Tools for Desktop development with C++...
start /wait "" %VS_BUILD_TOOLS_INSTALLER% --quiet --wait --norestart --nocache --installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" --add Microsoft.VisualStudio.Workload.VCTools --log %LOG_FILE%
start /wait "" %VS_BUILD_TOOLS_INSTALLER% --add Microsoft.VisualStudio.Workload.VCTools /S /D="%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools"

REM Check if the installation was successful by looking for cl.exe
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\*\bin\Hostx64\x64\cl.exe" (
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC" (
echo Error: Visual Studio Build Tools installation failed.
echo Check the log file for more details: %LOG_FILE%
exit /b 1
Expand Down

0 comments on commit d5b4702

Please sign in to comment.