Introduction: Batch Files That Open Multiple Programs!
Alright, it's pretty self explanatory. This can be especially useful if you are at work and you go through a process where you have to open, for example; Microsoft Word, Microsoft PowerPoint, Microsoft Outlook, Internet Explorer, etc.
So, let's get started!
Step 1: Open Notepad
If you read my last instructable, you should know how to do this. But if you didn't, here's how:
Just open your start menu and then all programs, then accessories, then notepad.
Or, start menu, run, then type in notepad.
Step 2: Writing the Batch File.
Alright, now if you want the little command prompt box to show up (See Model 1) skip the section in parentheses.
(If you don't want it to show up, type "echo off" at the top of notepad. Though it may flash, it won't stay on for long.)
Ok, so what we do first is type in "start /d" (Without the quotes). Then make sure there is a space between the "start" and the "/d". Then find the first program you want the batch file to open, right click on it, then click properties, then find where it says location (or if it's a shortcut, find target) and copy the location in the bar. Now go back to notepad, then put a quotation mark (") and paste in the location. Now, if it just has the folder, but not the program or file, you need to type in the name of the program. So for example, ("C:\Documents and Settings\User\Desktop\Test.bat"). Now with some computers, it will need to be written like this: ("C:\Documents and Settings\User\Desktop" Test.bat). Another important note, if the file name has a space in it, for example (Test Batch.bat) you have to put quotes around it. You'll just have to play around with it and see which way works.
Alright, now repeat the above paragraph with all the programs you want the batch file to open included.
Step 3: Saving the Batch.
This is the easy part!
Once you finish writing the batch file, on the top-right, click "File", then "Save as...". Now type in the name you want it to be, and make sure it has .bat at the end of it. For example, (Test.bat).
Now, test it out! Double click on it and see if it opens up the programs you wanted it to. If it doesn't try changing it form something like ("C:\Documents and Settings\User\Desktop\Image.gif") to something like ("C:\Documents and Settings\User\Desktop" Image.gif).
You may have to fool around with it a bit.
Step 4: Shortcuts and Hot Keys (Optional)
One of my favorite things to do is make a batch file like this and use my hot key on my laptop to open it.
You can also hide the actual batch file in My Documents or on the C: and make a shortcut to it on your desktop. Once you make the shortcut, you can change the icon!
All computers have a different way of setting a hot key, it may have a button next to the hot key, it could have an icon on the taskbar, etc.
To change the icon if you make a shortcut, just right click on the shortcut and select properties then change icon.
Step 5: You're Done!
Well, now you can (hopefully) use this and put it to good use, whether it be to help you start up your programs in the morning at work or just to open up all your graphic design programs or whatever you want!
I hope this was useful to you! =D
8 Comments
7 years ago
i want this batch file to open another batch file. how would i do that?
8 years ago
Cool! I am busy with a similar code
8 years ago on Introduction
I do a similar thing for connecting over RDP's that require a VPN to open, this way I can automatically disconnect after closing the RDP connection
@ECHO OFF
cd C:\
ECHO -----Connecting to VPN with OpenVPN-----
start openvpn-gui.exe --connect [VPNNAME].ovpn
ECHO Waiting for VPN to connect
timeout /t 13
ECHO -----Opening RDP Connection-----
ECHO Username: [USERNAME], Password: [PASSWORD]
ECHO Password has been copied to your clipboard
Echo [PASSWORD]| clip
start /w mstsc "[RPDFILE]"
ECHO -----RDP closed, now closing VPN-----
taskkill.exe /F /IM openvpn-gui.exe
Exit
8 years ago on Introduction
i wanna close bittorrent when i open Opera/firefox ,and i want bittorrent automatically reopened when i close the browser.how to do this?
14 years ago on Introduction
how do you get a program to open, then close after 5 seconds, and then open another program.
Reply 13 years ago on Introduction
That's only possible if the program you want to close was written to allow for that functionality.
Read the documentation. Look for a 'command line' section, and read about the switches.
For example, if the program was called Trill, the programmer might have written the capability to detect and respond to commandline switches so that you could type "C:\Folder\Trill.exe" /q -- and the program would quit instead of starting again.
You would also need a '5 second' time delay function, which is a simple utility that you can find in freeware.
14 years ago on Introduction
hey what if i want to open a file would i do this to open a picture folder: D:\stuff\pictures\ or what?
Reply 14 years ago on Introduction
First, placing all your files in D:, surprising choice. Second, do explorer D:/stuff/pictures.