Click here to Skip to main content
15,913,115 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Im trying to run the below commands from .bat file but it is not properly executing

comspec% /k C:\Win16App\VisualStudio2005\Common7\Tools\vsvars32.bat

devenv D:\pa\t_BL\t_91F\tdf\t.vcproj /build

.....From command line im able to run directly and it is working fine .But when i put the following commands in .batch file it is not working as intended.
Posted
Comments
Prerak Patel 27-Jul-11 4:53am    
Need more description.
explorerC 27-Jul-11 5:02am    
when i run the command comspec% /k C:\Win16App\VisualStudio2005\Common7\Tools\vsvars32.bat from windows command line shell .......it sets the path for devenv and im able to run the devenv command from command line.It is successfully building the project .......But when i put the same commands in batch file and try to run from batch file.It is not building the project.

1 solution

Hi,

You cannot directly call Bat file inside another bat file.

You should use CALL while calling it

i.e. in your main bat file use


CALL BatFileName.bat





This should work. :)
 
Share this answer
 
v2
Comments
explorerC 27-Jul-11 5:35am    
I TRIED UR solution
i dont think it is problem with .bat file question is about devenv command

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900