Home
SEARCH

 

How to launch multiple programs at startup in a specific sequence with a delay between launch commands.

Microsoft Windows provides several ways to force programs to load in a specific order at startup. One technique involves using the Task Scheduler program that comes with Windows. Another technique is to write a small VBScript program to do the job and then putting the VBScript in the Startup folder. Another technique involves adding entries to the registry under the key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run.
All of the above techniques will work however for most PC users, they are a little more complex than is really necessary.

Perhaps the quickest and easiest way to accomplish the job is to create a simple batch file that contains the command lines for each program that you want to launch in the order that you want to launch them. You could then put a shortcut to the batch file in your startup folder. A batch file is just a simple text file that has been saved with the filename extension ".BAT" and you can use any text editor including the Notepad program that comes with Windows to create or edit batch files.

For example, suppose that you want to launch TCPCom.Exe first and then pause the batch file for 15 seconds to give TCP/Com time to load and then launch WinWedge.exe.

You could create a batch file using the Notepad program containing the following 4 lines:

CD "C:\Program Files\WinWedge Pro"
TCPCom.exe
REM | CHOICE /C:AB /T:A,15 > NUL
WinWedge.exe MyConfig.SW3


The first line above changes the default file folder to the WinWedge Pro folder.
The next line launches TCP/Com.
The third line uses the batch file command "CHOICE" to force the batch file to pause for 15 seconds. The CHOICE command is a special batch file command that waits for the user to press one of several keystroke choices however it also has a "Timeout" option that automatically causes a specific choice to be selected if no user input is detected for a specified number of seconds. This is the trick that is providing the delay in the above batch file. In this case we are not actually waiting for the user to type anything and instead we are simply using the timeout option in the CHOICE command to provide a delay between the other batch file commands.
(The CHOICE delay trick above was found on the following web page: http://www.robvanderwoude.com/index.html)
The last line launches WinWedge specifying the name of the configuration file that you want it to load on the command line.

You could save the batch file from Notepad with the filename: C:\Launcher.BAT
and then put a shortcut to the batch file in your startup folder so that Windows executes the batch file automatically when it starts up.