Ok, I’m trying to run programs on startup, but delayed like five minutes.
My batch file is below. The problem is that Comodo firewall starts up, but the batch file stops there. It never reaches the next sleep command. What can I do? The “start” command just loads another command window.
Well written programs usually are setting the Return or Result Code depending on the logic and the situation / circumstances of Exit[ing]
You can control and branch the batch or the script by analyzing that “Code”
using “IF ERRORLEVEL” (in the batch file)…
That’s very helpful stuff, but again - the program should be written properly and all available Result Codes (the meaning) should be declared in the documentation
The main purpose of the remark is - waiting for the executable being completed is necessary, but then probably the execution may’ve ended unexpectedly / with the error / or in a normal manner but depending on the passed parameters,
so it may happen that is not a good time to “Sleep”/delay but rather “Wake up and Run!!!” ;D
But seriously, I couldn’t find this in Google, so I asked here. Thanks for all the good answers.
panic, I actually want comodo to start, then go to the next line right away (which is the sleep program), then load pidgin, then skype, catch my drift? These are programs I don’t want to exit.
You should not use CALL, as CALL is supposed to call a secondary batch file, closed by EXIT: prefer START.
Depending upon the OS you are using, SLEEP is not automatically implemented: SLEEP is part of the 2003 Resource Kit where it is supposed to be download from; to make sure, go to the Dos prompt and, assuming the SLEEP executable is under the path, type:
SLEEP/?
If SLEEP does not work, the same can be accomplished by CHOICE:
CHOICE /c:YN /n /t:Y,20
where c provides silent execution and 20 is the number of seconds until the default choice (continue) occurs.
The last alternative, outside dedicated utilities, is to ping the localhost: