3

I have a following batch file

echo Setting  visual studio 2010 environment variables
set VSPATH="C:\Program Files (x86)\Microsoft Visual Studio 10.0"
%VSPATH%\VC\vcvarsall.bat

echo Generating Service

the 'Generating Service' line never prints out, can someone point out how it should be done so batch file continues execution ?

np-hard
  • 5,585
  • 6
  • 49
  • 74

3 Answers3

5

Try using the CALL statement in front of your batch file

echo Setting  visual studio 2010 environment variables 
set VSPATH="C:\Program Files (x86)\Microsoft Visual Studio 10.0" 
CALL %VSPATH%\VC\vcvarsall.bat 

echo Generating Service 
LittleBobbyTables - Au Revoir
  • 31,192
  • 25
  • 105
  • 113
1

Prefix it with start:

echo Setting  visual studio 2010 environment variables
set VSPATH="C:\Program Files (x86)\Microsoft Visual Studio 10.0"
start %VSPATH%\VC\vcvarsall.bat

echo Generating Service
Lekensteyn
  • 61,566
  • 21
  • 152
  • 187
1

use this if you want the vcvarsall.bat to run in the current window and not a separate one.

Call %VSPATH%\VC\vcvarsall.bat
StingyJack
  • 18,551
  • 8
  • 61
  • 118