GOOGLE search

Custom Search

search results

Friday, August 1, 2008

Control Start-Up Launch Order

Windows checks various locations in the file system and Registry to determine which programs should launch at start-up, but gives you no real control over the launch order. Here's how to enforce a specific order, perhaps to connect to a VPN before launching a program that needs that connection.

If shortcuts to the start-up programs reside in the Start menu's Startup folder, move them to a new folder; otherwise, create a shortcut to each in a new folder. Open a command prompt, navigate to that new folder, and issue the command DIR /B > ORDERED.BAT. Enter NOTEPAD ORDERED.BAT to open the resulting batch file in Notepad. Use copy-and-paste to put the lines in the desired order. Surround each line with quotes and precede it with the START command, a pair of empty quotes, and a space—for example, START "" "C:\Ordered Launch\First Program.lnk".

Double-click the batch file to test it. The programs will start in the specified order, but if one takes longer to initialize, it may show up out of order. In that case, insert a delay line after the slow-starting program. This line will insert a 5-second delay: ping -n 5 127.0.0.1 > nul. Edit the number after -n to set a different delay. After testing, use the right mouse button to drag the batch file to the Start menu's Startup folder, selecting Create Shortcut(s) Here.

No comments: