0

after the startup.bat command I wanted to start chrome with url: http://localhost:8080/Nexus but bat file getting stopped after tomcat is being started up.

Code in the batch file is as follows:

@echo off start cmd cd I:\Users\5251966\Nexus echo yes|copy catalina.bat I:\apache-tomcat-7.0.55-windows-x64\apache-tomcat-7.0.55\bin echo yes|copy tomcat-users.xml I:\apache-tomcat-7.0.55-windows-x64\apache-tomcat-7.0.55\conf cd I:\apache-tomcat-7.0.55-windows-x64\apache-tomcat-7.0.55\bin startup.bat start chrome http://localhost:8080/Nexus 
4
  • please give solution.......anyone........if you are able to get ans Commented Mar 7, 2018 at 11:12
  • Try Call startup.bat and you're probably best advised to use CD /D too. Commented Mar 7, 2018 at 11:13
  • thanks a lot.....................very good solution its working Commented Mar 7, 2018 at 11:27
  • sai bhargav, if an answer has provided a solution to your issue, please consider marking it as accepted; thank you. Commented Mar 7, 2018 at 13:21

2 Answers 2

1

Here's some example code for you:

@Echo Off Set "srcDir=I:\Users\5251966\Nexus" Set "dstDir=I:\apache-tomcat-7.0.55-windows-x64\apache-tomcat-7.0.55" Copy /Y "%srcDir%\catalina.bat" "%dstDir%\bin" Copy /Y "%srcDir%\tomcat-users.xml" "%dstDir%\conf" CD /D "%dstDir%\bin" Call "startup.bat" Start chrome http://localhost:8080/Nexus 
Sign up to request clarification or add additional context in comments.

Comments

0

Use call to call other batch files from a batch file, otherwise your parent batch file terminates and won't run any more commands after invoking the child:

call startup.bat 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.