Search : in
By :

Command not working in .bat file

Last answer on Dec 2, 2008 4:44:18 pm GMT jsfgeeks, on Dec 2, 2008 11:04:16 am GMT 
 Report this message to moderators

Hello,

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,
JSF GEEKS

Configuration: Windows XP
Firefox 3.0.4

Best answers for « Command not working in .bat file » in :
Enabling/Disabling the firewall using command line ShowEnabling/Disabling the firewall using command line Disable Windows XP firewall Enable the Windows XP firewall Under Windows XP SP2, it is possible to enable/ disable the firewall with the following command lines: Disable Windows XP...
How to use the tar command ShowHow to use the tar command Archiving files with “tar” Archiving folder (or directory) with “tar” Unpacking file with tar Unpack the file with tar Unpacking specific files with "tar" Archiving files with “tar” The "tar"...
[Sed] Delete one or more lines from a file Show[Sed] Delete one or more lines from a file Removing one (or several) line (s) of a file Syntax: sed '{[/]||[/]}d' sed '{[/][,][/]d' /.../=delimiters n = line number...
Download Empty Temp Folders ShowAfter some days of use the PC is already full of temporary files which are not necessary but voluminous. You must delete them in order to get more space disk. Empty Temp Folders is a software which allows to delete all the default stored temporary...
FTP protocol (File Transfer Protocol) ShowIntroduction to FTP protocol FTP protocol (File Transfer Protocol) is, as its name indicates a protocol for transferring files. The implementation of FTP dates from 1971 when a file transfer system (described in RFC141) between MIT machines...
Using FTP commands ShowThe FTP protocol FTP (File Transfer Protocol) is a protocol — meaning a standard language that lets two machines communicate — used so that computers of different types (or with different operating systems) can transfer files over a...
Linux commands ShowTable of main Linux commands Command Description DOS equivalent ls lists the content of a directory dir cd change directory cd cd .. parent directory cd.. mkdir creates a new...

1

 ffrreeaakk, on Dec 2, 2008 4:44:18 pm GMT

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.

Reply to ffrreeaakk