Batch File Help

Hello forum,

I found this forum very useful, I actually want help about batch file.

I have created one batch file to start service and i have added this file to start up programs so when computer opens it run the service but now the problem is i am using sms software which is using remote mysql so if my internet connection not establish it will not start service and give me error like the service could not be started.. and before my internet establish it run batch file so service start failed....

In short i want to set timing in batch file like after computer start it try to run service after 3 or 4 minutes bcoz till that my internet will be connected and when it try to start service it will start service successfully..

My batch file codes are..


net start | find "AxSmsSvc" > nul 2>&1
if not .%errorlevel%.==.0. goto startservice
goto end

net start "AxSmsSvc"
echo service restarts @ %date% %time% >> C:\checklog.txt


I am not expert so if someone can re-edit this code and give me the code that will be good i will copy code to batch file thanks...
1 answer Last reply
More about batch file help
  1. Look at the choice command, which supports a timeout before continuing with a default choice.
Ask a new question

Read More

Computers Internet Connection Windows XP