Before the run.bat batch script is executed set an environment variable 'NOPAUSE' to contain a value (It doesn't matter what)
Alternatively remove the line from run.bat that calls pause.
I appreciate your reply. I exactly did what you said. This allows shutdown.bat to complete without waiting for a key stroke but still does not stop the JBoss server window from waiting for a keystroke. My impression is that shutdown.bat invokes the java class org.jboss.Shutdown with a bunch of parameters. This class I believe send a JMX message to the JBoss server to shutdown. So Iam not sure how I can prevent the JBoss server from waiting for a keystroke.
The reason this is an issue for me is that when a user logs off the shutdown.bat gets invoked by the service handler. At the end of the JBoss shutdown there is a prompt waiting for the key stroke. Meanwhile, Windows comes up with the dialog box asking the user to relogin. After logging in the desktop is displayed but the old Jboss console window is still open waiting for a key stroke to close the window. Because of the servive handler does not seem to restart the JBoss server after logging in.