From a88194e8915d1e8572a43ddbfb770d3bd61ed8ad Mon Sep 17 00:00:00 2001 From: Daniel Podder Date: Sat, 12 Aug 2017 17:21:00 -0700 Subject: [PATCH] Default to msbuild.exe on PATH if found --- tools/ColorTool/build.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/ColorTool/build.bat b/tools/ColorTool/build.bat index e39dc3d8e..2b18d09b4 100644 --- a/tools/ColorTool/build.bat +++ b/tools/ColorTool/build.bat @@ -2,6 +2,10 @@ rem Add path to MSBuild Binaries set MSBUILD=() +for /f "usebackq tokens=*" %%f in (`where.exe msbuild.exe 2^>nul`) do ( + set MSBUILD="%%~ff" + goto :FOUND_MSBUILD +) if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe" ( set MSBUILD="%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe" goto :FOUND_MSBUILD