Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to start multiple programs with ONE mouseclick !

03 Aug 2010   #1
hackerman1

W7-Enterprise + WS-2008 (Converted to Workstation)
 
 
How to start multiple programs with ONE mouseclick !

hi !

How to start multiple programs with ONE mouseclick

as we all know, you can drag a shortcut / program / file to the startup-folder, then it automatically starts when you boot.

but, what can you do if you want a similar function for other programs / files,
and you want to start them manually, NOT when you boot ?

you can of course create a batch-file, like fx:

-------------------------------
cd "c:\windows\system32\"
notepad.exe
cd "c:\program files\ABCD"
abcd.exe
-------------------------------

but if you want to start many programs, it will be a lot of work as you have to enter the path and also the name of every program.
this is because most programs require that you first change to their folder BEFORE you start them, as they need access to other files in their own folder when they start.
and if you later want to change / add files in the folder...

and if you want "drag & drop" like in the startup-folder ?

here is a simple solution:

1. create a folder
2. open it
3. drag your links to programs / files into the folder
4. create a bat-file that starts everything in the folder
5. create a link to the bat-file, fx. on your desktop / taskbar


i my EXAMPLE below the folder is named: "PROG1" and is located in "C:\Programs"

the bat-file: "PROGRAMS 1":
FOR %%X IN (C:\Programs\PROG1\*.*) DO rundll32 shell32.dll,ShellExec_RunDLL %%X

but of course you can put your "multipleprograms-folder" where you want it.


the "trick" is a FOR-loop that runs the same command:
"rundll32 shell32.dll,ShellExec_RunDLL" for every link in the folder.

the real beaty of putting LINKS in the folder is that you do NOT have to change the folder for every single program that you want to start, as the links have all the needed information.

update:

changed the bat-file above since itīs actually a bad idea to put a lot of folders on your desktop as it can slow down your computer.
the (original) bat-file was just an EXAMPLE, showing the principle.
i (temporarily) used a folder on my desktop while testing, i actually have all menu-folders & bat-files on "E:\System"....

Ztruker suggested to use "%userprofile%" in the bat-file,
but itīs smarter to use a COMMON folder like fx. "C:\Programs", instead of the desktop,
because then you can use the same bat-file & "multipleprograms-folder" on ALL accounts, both ADMIN & USER-account(s).


My System SpecsSystem Spec
.
03 Aug 2010   #2
Thorsen

Win7 Home Premium 64x
 
 

Thats clever. Then all you have to do is change the shortcuts dropped into the folder or drop a new shortcut into the folder whenever you want to add a new program to the list.
My System SpecsSystem Spec
03 Aug 2010   #3
hackerman1

W7-Enterprise + WS-2008 (Converted to Workstation)
 
 

Quote   Quote: Originally Posted by Thorsen View Post
Thats clever.
THANKS !

Quote   Quote: Originally Posted by Thorsen View Post
Then all you have to do is change the shortcuts dropped into the folder or drop a new shortcut into the folder whenever you want to add a new program to the list.
exactly right.

it works exactly the same as the "Startup-folder, you can use normal "drag & drop", which makes it very easy to add or remove programs / links.

no "programming"...
My System SpecsSystem Spec
.

03 Aug 2010   #4
Ztruker

Windows 10 Pro X64
 
 

That is very cool. Just tried it and it works perfectly. One small suggested change.

Instead of:

FOR %%X IN (C:\Users\HACKERMAN\Desktop\PROG1\*.*) DO rundll32 shell32.dll,ShellExec_RunDLL %%X

use

FOR %%X IN (%userprofile%\Desktop\PROG1\*.*) DO rundll32 shell32.dll,ShellExec_RunDLL %%X

That makes it universal and requires no editing. Works for W2K, XP, Vista or Win 7.
My System SpecsSystem Spec
03 Aug 2010   #5
hackerman1

W7-Enterprise + WS-2008 (Converted to Workstation)
 
 

yes, of course you can use "%userprofile%", but you donīt have to,
that bat-file was just an example, showing the principle.

i (temporarily) used a folder on my desktop while testing,
of course you can put your "multipleprograms-folder" where you want it,
personally i have all menu-folders & bat-files on "E:\System"....
My System SpecsSystem Spec
24 Feb 2015   #6
tsttm

win 8.1
 
 

Hi, I know this is an older thread-I've been using this batch file for quite some time now. Since upgrading to a new computers that run Windows 8.1, this solution doesn't work for me that. Is there something that is related to Windows 8.1 that problematic? is there a way to fix it? Thank you?
My System SpecsSystem Spec
25 Feb 2015   #7
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Hi Tsttm,

I'm going to take a guess and say that it's the Rundll32 "command" in Hackerman's batch file that causes it to not work for your Windows 8.1 machine.

Rundll32 should never be called from within batch files anyway. It's not designed to be invoked that way.

Here is a better remake of Hackerman's script.

Code:
@echo off
set "target=C:\Programs\PROG1"
if not exist "%TARGET%" echo The directory "%TARGET%" does not exist. && exit /b 1
if exist "%TARGET%\*" (
	pushd "%TARGET%"
) else (
	for %%I in ( "%TARGET%" ) do (
		pushd "%%~dpI"
	)
)
for /f "delims=" %%I in (' dir /a:-d /b "%TARGET%" ') do (
	cd /d "%%~dpI"
	start "" "%%~fI"
)
popd

Before running this batch file, alter the 'target' variable value to a folder path of your choice. All files contained within this folder will be invoked. You may also specify a file-mask along with the directory to limit what file types should be started. E.g. set "target=C:\Programs\PROG1\*.txt" will tell the script to open only all txt files contained within the PROG1 folder.
My System SpecsSystem Spec
25 Feb 2015   #8
tsttm

win 8.1
 
 

Haha! thank you Pyprohly, it works!!!
My System SpecsSystem Spec
Reply

 How to start multiple programs with ONE mouseclick !




Thread Tools




Similar help and support threads
Thread Forum
Blinking OS! Every keystroke or mouseclick causes chaos
Very weird activity on spouse's computer. Started on Facebook with multiple windows opening and the dialog boxes getting looonnnng. I had him log off and change his password. When he tried to change it the screen dimmed with each click until it went black. I hit the off button and shut it down....
System Security
Batch Files - Start Multiple Programs At Once
Batch Files - Start Multiple Programs at Once 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...
Tutorials
Start (and stop) multiple programs with one click?
I want to be able to quit several programs that are usually running in the background with one click so I can devote more resources to resource-intensive programs. When I'm done, I want to bring all those programs back with one click. What's the best way to accomplish this? If not quitting them,...
Performance & Maintenance
Some Programs won't go to Start Menu's Recent Programs List...
No matter how many times I launch Skype or iTunes, they just won't get added to the Start Menu's Recent Programs list. Any ideas why?
General Discussion
Win7 Opening Up Multiple Programs By Itself During Re-Start
I had a very unusual problem. I could not figure out what happened. It started out that during a session of copying many files accross from a large memory stick to a hard drive the copy process stopped responding. I went in to the control panel and told it t0 end the task. Windows...
BSOD Help and Support
MouseClick Sound
Mouse Click Sound is not coming...pliz help:(
Sound & Audio


Our Sites

Site Links

About Us

Find Us

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

All times are GMT -5. The time now is 01:41.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App