1

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.

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.