diff --git a/tools/build-environment/win32/guess-msvc.bat b/tools/build-environment/win32/guess-msvc.bat index 869146447e9..f48f7300c53 100755 --- a/tools/build-environment/win32/guess-msvc.bat +++ b/tools/build-environment/win32/guess-msvc.bat @@ -73,6 +73,13 @@ SET SDK2003SP1KEY=%SDKROOTKEY%\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3 SET SDK2003SP2KEY=%SDKROOTKEY%\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1 SET SDK6KEY=HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0\WinSDKBuild +REG QUERY "%SDK6KEY%" /v InstallationFolder >nul 2>nul +if "%SDKDIR%"=="" ( + IF %ERRORLEVEL% EQU 0 ( + FOR /F "tokens=2* usebackq delims= " %%A IN (`REG QUERY "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0\WinSDKBuild" /v InstallationFolder`) DO SET SDKDIR=%%B + ) +) + REG QUERY "%SDK2003SP2KEY%" /v "Install Dir" >nul 2>nul if "%SDKDIR%"=="" ( IF %ERRORLEVEL% EQU 0 ( @@ -87,13 +94,6 @@ if "%SDKDIR%"=="" ( ) ) -REG QUERY "%SDK6KEY%" /v InstallationFolder >nul 2>nul -if "%SDKDIR%"=="" ( - IF %ERRORLEVEL% EQU 0 ( - FOR /F "tokens=2* usebackq delims= " %%A IN (`REG QUERY "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v6.0\WinSDKBuild" /v InstallationFolder`) DO SET SDKDIR=%%B - ) -) - ECHO Visual C++ 6 directory: %VC6DIR% ECHO Visual C++ 7.1 directory: %VC71DIR% ECHO Visual C++ 8 directory: %VC8DIR%