Reputation: 13
I want to execute two cmd commands.This is my batch file:
set MW_HOME=D:\wls1211_dev
set JAVA_HOME=D:\jdk1.6.0_45
set JAVA_VENDOR=Oracle
set root=D:\wls1211_dev
set pathname=D:\WLSDomain
CD /D %root%
%MW_HOME%\wlserver\server\bin\setWLSEnv.cmd
CD /D %pathname%
startWebLogic.cmd
But after executing the setWLSEnv.cmd command its not moving to the next directory where it has to execute the startWebLogic.cmd .
Thanks for your help.
Upvotes: 1
Views: 1678
Reputation: 70933
If you directly invoke a batch file from inside a batch file, the execution is transfered to the called file and does not return.
You need to use call %MW_HOME%\wlserver\server\bin\setWLSEnv.cmd
so when setWLSEnv.cmd ends, execution continues in your first batch file.
Upvotes: 4