Unable to come out of the start command in a batch file
Posted: 28 Aug 2015 11:55
Hi All,
I am trying to test the service which is running or not, hence wrote the below code. It running fine till starting the webpage, after which its not going to the next command (i.e., line number 4). Can someone pls help me to crack it.
Thanks in advance
Quick response is appreciable.
I am trying to test the service which is running or not, hence wrote the below code. It running fine till starting the webpage, after which its not going to the next command (i.e., line number 4). Can someone pls help me to crack it.
Code: Select all
sc \\server_name query ActiveMQ | find /I "STATE" | find "RUNNING"
if errorlevel 1 goto end
sc \\server_name | start http://localhost:1234/
if errorlevel 1 goto end
echo URL is running
goto success
:success
echo Activmq running fine
:end
echo **Error
echo %date% %time% -- Stopping the services - END
Thanks in advance
