Windows 7 Forums Search
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7 - Batch Files - Start Multiple Programs At Once

 

Batch Files - Start Multiple Programs At Once

How to Use a Batch File to Run Multiple Programs
Published by notsograymatter
04-12-2010
Default Batch Files - Start Multiple Programs At Once

Batch Files - Start Multiple Programs at Once

information   Information
All of the work done in this tutorial will be done through MS DOS Batch Files. They are simply a method by which to enter multiple commands into a command prompt without manually typing them. Batch files are run through Command Prompt but can be accessed by shortcuts as well.


Open a New Document in Notepad

Open a New Document in Notepad and save it as filename.bat, choose a filename that is easy to remember.

Command Echoing

The first thing we're going to do is turn off command echoing. It isn't an integral part of this tutorial, but becomes annoying when running the batch file through command prompt.

Enter this line in Notepad:
@echo off

Starting up the Programs

This next set of lines will start the programs. I will use real directories for programs that everyone has in order to show the process properly. The rem command is simply a comment, the cd command changes the directory and start is self-explanatory.

Enter these lines:
rem Notepad
cd %windir%\system32
start notepad.exe
rem Calculator
cd %windir%\system32
start calc.exe

Closing Command Prompt

No one wants to run a batch file and leave a command prompt open, so now we'll add a line to close it.

Enter this line:
Exit
  • Confirmation
The final text document will look like this:

@echo off
rem Notepad
cd %windir%\system32
start notepad.exe
rem Calculator
cd %windir%\system32
start calc.exe
exit

Save & Create a Shortcut

Now you'll need to save the file as filename.bat. In reality the name can be *ANYTHING*.bat but name it something you can type easily since it'll be placed in the target command of the shortcut.

Now create a shortcut. It doesn't matter where you saved the .bat file, unless you plan on writing in the shortcut parameters instead of right clicking and sending the shortcut to the desktop.

Change the Icon for the Shortcut

Now you can change the icon for the shorcut.

Right Click Shorcut > Properties > Change Icon Box > OK > Choose From Available Icons



Published by
notsograymatter's Avatar
מעשוגע פּאָסטן נוס
Join Date: Mar 2010
Posts: 1,552

Tutorial Tools
04-12-2010   #1
Thorsen


Win7 Home Premium 64x
 
 


I usually also change the Icon for the shortcut so it doesn't look like a .bat file

Excellent Tutorial btw

My System SpecsSystem Spec
04-12-2010   #2
CommonTater


XP Pro SP3 X86 / Win7 Pro X86
 
 


Actually since System32 is part of the windows search path and START is unneeded when launching a program you could have simpy used...

notepad
calc

that's it... two simple one word lines... are all you really needed.

Don't believe me? Try it.
My System SpecsSystem Spec
04-12-2010   #3
notsograymatter


W7 Ult. x64 | OS X
 
 


Quote   Quote: Originally Posted by CommonTater View Post
Actually since System32 is part of the windows search path and START is unneeded when launching a program you could have simpy used...

notepad
calc

that's it... two simple one word lines... are all you really needed.

Don't believe me? Try it.
That's true, but it's much better to include the start line in the tutorial because people new to tutorials might think it's not necessary ever. It's much better to include optional commands because when they become necessary, the average user will have them there. Not to mention the fact that it doesn't hurt anything to keep them in there.
My System SpecsSystem Spec
.


04-13-2010   #4
Thorsen


Win7 Home Premium 64x
 
 


Quote   Quote: Originally Posted by CommonTater View Post
Actually since System32 is part of the windows search path and START is unneeded when launching a program you could have simpy used...

notepad
calc

that's it... two simple one word lines... are all you really needed.

Don't believe me? Try it.
Interesting I have not tried this.
My System SpecsSystem Spec
Comment

 Batch Files - Start Multiple Programs At Once problems?



Tutorial Tools



Similar Threads for: Batch Files - Start Multiple Programs At Once
Windows 7 Tutorial Category
Cannot start x86 Programs from exe files Software
Solved Batch files not opening some programs General Discussion
Start Menu search programs and files not working General Discussion
Launch all programs in the start menu all at once possibly using batch General Discussion
Open Multiple Files one click - simple bat/batch file General Discussion


All times are GMT -5. The time now is 03:02 AM.



Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30