Skip to content

Commit

Permalink
Fix install script so vswhere can be called when executing outside sc…
Browse files Browse the repository at this point in the history
…riptdir.
  • Loading branch information
Sibras committed Jan 28, 2019
1 parent 7bf81fb commit d947373
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install_script.bat
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if not exist "%SCRIPTDIR%\vswhere.exe" (

:VSwhereDetection
REM Use vswhere to list detected installs
for /f "usebackq tokens=1* delims=: " %%i in (`vswhere -prerelease -requires Microsoft.Component.MSBuild`) do (
for /f "usebackq tokens=1* delims=: " %%i in (`"%SCRIPTDIR%\vswhere.exe" -prerelease -requires Microsoft.Component.MSBuild`) do (
if /i "%%i"=="installationPath" (
for /f "delims=" %%a in ('echo %%j ^| find "2019"') do (
if not "%%a"=="" (
Expand All @@ -103,7 +103,7 @@ for /f "usebackq tokens=1* delims=: " %%i in (`vswhere -prerelease -requires Mic
)

REM Try and use vswhere to detect legacy installs
for /f "usebackq tokens=1* delims=: " %%i in (`vswhere -legacy`) do (
for /f "usebackq tokens=1* delims=: " %%i in (`"%SCRIPTDIR%\vswhere.exe" -legacy`) do (
if /i "%%i"=="installationPath" (
for /f "delims=" %%a in ('echo %%j ^| find "2015"') do (
if not "%%a"=="" (
Expand Down

0 comments on commit d947373

Please sign in to comment.