Command not working in .bat file

 kiraks2009 -

I am developing a JSF application. I need to make batch file for that. So that when the user clicks on it, it automatically starts the glassfish server, deploys the war file and starts the browser with the project window.

I can do this in cmd prompt like below;

Step-1 : cd Goto bin directory of glassfish
Step-2 : asadmin start-domain domain1
Step-3 : asadmin deploy --user admin path-of-war-file.war
Step-4 : @start "" /b "iexplore.exe" http://localhost:8080/projectname/

I can achieve that from cmd prompt, but when I tied it in batch file then after starting the server, it quits the batch file and not executing the commands for deploying and starting browser.

Can anyone help me out ???

Thanks in advance,

2 replies

If asadmin is a name of application you run then try step2 a d 3 to be:
start /W asadmin start-domain domain1
start /W asadmin deploy --user admin path-of-war-file.war

/W switch of windows' Start.exe makes script wait for completition of command.
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month

It works... THANKS....
Thanks dude...was in the same fix and now it works as a charm.