@echo off rem myVC++.bat 0.01 UTF-8 dh:2011-07-25 echo * MyVC++.bat 0.01: %USERNAME%'s %COMPUTERNAME% VC++ 2008 Express Projects IF "%VS90COMNTOOLS%"=="" GOTO :FAIL1 IF NOT "%VCINSTALLDIR%"=="" GOTO :PRESET rem The vsvars have already been set so don't do it again IF NOT EXIST "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" GOTO :FAIL2 CALL "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat" :PRESET ECHO * Using VC++ at %VCINSTALLDIR% IF %ERRORLEVEL% == "" SET ERRORLEVEL=1 EXIT /B %ERRORLEVEL% :FAIL1 ECHO: ECHO * THIS SCRIPT REQUIRES VISUAL C++ 2008 TO BE INSTALLED. ECHO * The environment variable VS90COMNTOOLS should have been set ECHO * as part of the Visual C++ or Visual Studio 2008 [Express] ECHO * install. Please reconcile myVC++.bat and your compiler ECHO * configuration. ECHO: EXIT /B 2 :FAIL2 ECHO: ECHO * FILE vsvars32.bat IS NOT AVAILABLE OR VC++ IS NOT INSTALLED ECHO * Install Visual C++ 2008 Express Edition or modify this ECHO * MyVC++.bat script to locate the vsvars.bat that properly ECHO * sets your Visual C++ command-line environment. ECHO: EXIT /B 2 rem |----1----|----2----|----3----|----4----|----5----|----6----|----7----|* rem SET ENVIRONMENT TO USE VC++ 2008 (Express). This script can be executed rem in a batch session to set the environment for performing a VC++ 2008 rem console project. To be saved as myVC++.bat wherever you want to work rem with the Visual C++ 2008 command-line compiler and tools. rem The procedure always exits with ERRORLEVEL 1 for success, 2 for failure, rem or the ERRORLEVEL left by the vcvars.bat file that is executed. rem 0.01 2011-07-25-11:33 cloned from VC++ 2010 version 0.03 on Astraendo. rem $Header: $ rem *** end of MyVC++.bat ***