Normally, I would have called the person lazy and told them to stop bothering me, but since this person was performing a repetitive task and needed to open the same applications every day, I thought I would come up with a solution. I also found that I usually open a couple of programs every morning no matter what: Chrome for Internet browsing, Outlook for checking email, and Visual Foxpro for writing code (since I’m a programmer). So instead of clicking on three icons, I decided to create what is called a batch file to open all three applications at once! You can create batch files in Windows very easily and all you need to create them is Notepad! Also, I cover how you can use Task Scheduler to run your batch file when your computer boots so that the programs start without even having to click once!
How to Create a Batch File in Windows
Step 1. First, open Notepad Step 2. Copy and paste the line below as the first line in the file: @echo off Echo off basically tells Windows to not give you any messages or popup windows when running the commands in the batch file. Step 3. Now we need to actually call the executable for each of the three programs that we want to open. So in our example, I want to open Firefox, Outlook, and Foxpro. The next three lines would look like this: start “Chrome” “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” start “Outlook” “C:\Program Files\Microsoft Office\Office12\Outlook.exe” start “Foxpro” “C:\Program Files\Microsoft Visual FoxPro 9\vfp9.exe” There are three parts to each command above, which I explain below: start – That is the command used in batch files to open programs “App Name” – The second parameter is the name of the application you are going to be opening. You can put any name you like here since it only uses this parameter for title purposes. “App Path” – The last parameter is the actual path to the executable file for the program. You can always find the path of a program by right clicking on the icon and going to Properties. For example, if I wanted to know the path to the executable file for Firefox, I would right-click and choose Properties.
Now all I need to do is look at the path in the Target box and simply copy and paste that into my batch file script.
Note that there are certain shortcuts where the Target box will be empty like shown below, mostly with Microsoft Office programs.
If this is the case, you have to manually go and look for the EXE file on the system. For Office, everything is located in C:\Program Files\Microsoft Office\Officexx if you installed the 64-bit version or C:\Program Files (x86)\Microsoft Office\Officexx if you installed the 32-bit version. The application files are usually just the name of the program like EXCEL, WORD or POWERPOINT. After you have added all the entries to your file, the batch file should look something like this:
Now all you have to do is actually save it as a batch file, which is very easy. Go to File and click Save As. Give your file a name like “Test.bat“. Note that I added the .BAT to the file name manually. Lastly, change the Save As Type to All Files instead of Text Documents.
That’s it! You should now go ahead and test out your batch file and see if all of your programs load up. One thing I have found is that loading applications via a batch file is much faster for some reason. I’m not really sure why, but Chrome, Outlook and Firefox all loaded several seconds faster than when I normally click on them.
Schedule Batch File on PC Startup
Now let’s schedule our batch file to run when we first log into Windows. To do this, click on Start, type in task scheduler and click on the first link.
Don’t become overwhelmed looking at the interface because we only have to create a very simple task. On the right hand side, you should see a link to Create Basic Task. Go ahead and click on that.
Now give your basic task a name, which can be whatever you want. You can also give it a description if you like. Click Next when done.
The next step is to choose the trigger. In our case, we want the batch file to be run when we log onto the computer, so choose When I log on. That’s the only option that really makes sense anyway.
The next step is to choose an action. In our case, the action will be to run our batch script, so choose Start a program.
Finally, we have to actually choose the batch file we want to run when we log onto the computer. Go ahead and click on the Browse button and navigate to the location of your batch file.
Click Next and then click Finish. Now go ahead and restart your computer and the programs should open when you log into Windows! Pretty neat, huh? If you have any questions, post a comment. Enjoy!