开发者

windows batch file terminating prematurely

I hav开发者_如何学Ce 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 ?


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 


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


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

Call %VSPATH%\VC\vcvarsall.bat
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜