Archive: How to delay a startup ?


How to delay a startup ?
I have a program which will connect to the internet when starting up.And i placed a shortcut of this programe at startup menu.
However,when the program started,it couldn't connect to the network.Seemingly the network didn't run before my programe.

How i can make my program start delaying some time so that the network has worked normally?

Thanks!


Mmhhh... the easiest way is a batch file:

@Echo Off
Echo Off

Title Waiting for network...
rem Title only works on NT4+ and changes the window caption

:Start
Ping www:google:cn -n 3
if ErrorLevel == 1 GoTo Start
Start C:\China\Will\Rise.EXE
Exit


Just start it minimized.

Originally posted by CG!
Mmhhh... the easiest way is a batch file:

@Echo Off
Echo Off

Title Waiting for network...
rem Title only works on NT4+ and changes the window caption

:Start
Ping www:google:cn -n 3
if ErrorLevel == 1 GoTo Start
Start C:\China\Will\Rise.EXE
Exit


Just start it minimized.
Thank you for reply.My program is not running under the console,so the "start" command does not start the Rise.exe.

BTW,thank you for the China Will Rise.

it doesn't matter if your program is running under the console or not.
By using Start instead of Call, you can call every file- and MiME-type.
With "Start www:google:cn" you can start the systems default browser. if you want your program to be startet maximized, use "Start /max".