Multiple Programs – One Shortcut

One small annoyance for a lot of people is having to click on the same five or six icons every morning to start their workday. For example, someone might need to open Outlook, Excel, QuickBooks, Calculator and Internet Explorer every single morning. That’s five mouse clicks to accomplish one task, and that can get annoying. Wouldn’t it be cool to have a single shortcut that can open all of these programs? You can easily do this via a batch file and five minutes of typing.

Try this: open Notepad and paste all of the yellow text below into the Notepad window. Save the file on your desktop as “sample.cmd” (make sure that “Save As Type:” is set to “All files” and not “Text Documents”, or else the file will be saved as sample.cmd.txt):

start calc
start /min mspaint
start charmap
start /max wordpad
exit

When you double-click on the batch file, the programs listed will open exactly in the order listed in the batch file. You’ll probably also notice that Paint has started but is minimized, while WordPad has been started in a maximized window. You might guess that this is because of the /min and /max switches in the batch file, and your guess would be correct.

If you try your hand at this and get an error message starting that “Windows could not find filename.exe”, it’s because you’re trying to run a program that’s not included in Windows’ PATH variable. What’s PATH? It’s a variable that Windows looks at when running commands. Folders included in PATH don’t require their path to be included in the command-line. Since C:\WINDOWS is always in PATH, you don’t need to type the full path to any executable in your Windows folder. That’s why in the first example it says “start calc” instead of “start c:\windows\system32\calc.exe”. If you want to start a program that’s outside of PATH, simply navigate to the folder that contains it, then run the START command, like so:

c:
cd “C:\Program Files\PeerGuardian2\”
start /min pg2.exe
timeout 15
cd “C:\Program Files\Azureus\”
start Azureus.exe
exit

The above batch file is something I use myself every day: it opens a P2P firewall called PeerGuardian, waits 15 seconds for the program to load fully, then opens the P2P app Azureus. Which brings me to another point: sometimes you not only need programs to open in a certain order, you also need one to fully load before you can start another. TIMEOUT.EXE is a tiny program from Microsoft that waits as many seconds as you indicate (15 seconds in my example) before executing the next line of the batch file. Not only is this good for the batch file above (you don’t want Azureus making connections to random computers without going through PeerGuardian first), using TIMEOUT.EXE is a good technique for replacing items in the Startup folder of your Start Menu. When you start Windows, many things are going on in the background, and starting a bunch of programs while all this is going on means that both Windows and those programs will open slowly. Adding a 30 second timeout at the beginning of the batch file gives Windows the time it needs to do its thing without slowing down to open six programs too. You can download TIMEOUT.EXE by clicking here (16kb file, zipped). Just unzip the program to your Windows folder to use.

One Reply to “Multiple Programs – One Shortcut”

  1. Thanks for the cmd batch file. Helps a lot.
    Can we create a batch file to run macros on different Access database located at diffrent places at one shot?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.