Jump to content
xisto Community
coolcat50

Start Multiple Programs With One Shortcut Windows XP

Recommended Posts

Welcome to my turoial on how to start multiple programs using one shortcut. You may probably be wondering how this is possible. Well this tutorial will use a language from MS-DOS called batch. I am not sure whether it is "language", but I do know that it is a way to program for MS-DOS. Batch is simply a way to run several MS-DOS commands with just one command. All batch files are run through Command Prompt, but they can be accessed with shortcuts also. Here are a few requirements for this tutorial.

 

Requirements

Windows XP (I tested this on XP, but it should work on many Windows systems)

Some programs

Notepad

Ok, let's go on and start our tutorial.

 

First, open up Notepad and start a new document. We will put all of our code here.

 

First we need to turn off command echoing. This is not neccessary, but can be quite annoying. This will only help if you are going to directly run the command through CMD.

Type in this code

@echo off

That will turn off our command echoing.

 

Now to running the programs. I will use two programs as an example. I will also use fake folders and stuff.

 

Type in this code after the first command.

rem Guild Warscd C:\Program Files\Guild Warsstart gw.exerem Firefoxcd C:\Program Files\Mozilla Firefoxstart firefox.exe

That code will change to those directories then run the appropriate executable file.

 

Those are example directories. The rem command simply means a comment.

 

This is the template for the programs.

cd Path to programstart Program .exe file
That is all to run the program.

 

Well, let's add one more command to close CMD after it is finished. This also will make it seem like CMD did nothing.

exit

So our final code should look like this:

@echo offrem Guild Warscd C:\Program Files\Guild Warsstart gw.exerem Firefoxcd C:\Program Files\Mozilla Firefoxstart firfox.exeexit

Ok after you have your code written, save the file as a .bat file. The file name is up to you. The file name though will be the command name. I will call mine guildfire.bat.

 

Ok, we have our program. What about the shortcut? Well I am going to explain that.

 

After you have the file saved. Be sure to remember where you saved it.

 

On your desktop, right click and create a new shortcut. When it asks you about the target, direct the target to the batch file we just made. Change the name and save. You just made a program starting program.

 

If you want to change the image

To change the shortcut's icon, simply go to it's properties and it should have a place to change the Icon Image. Simply change it with something like a BMP file. The best image size for the icon is about 50x50.

 

Thank you for reading this tutorial and I hope you have fun.

Share this post


Link to post
Share on other sites

I found this tutorial using Google.It was just what I needed except for one thing.My hard drive is partitioned, and the two applications I wanted to run were on drives C: and D:The bat file could only find the application that was on the same drive as it was, so I had to move the second app.Then it worked great!Thanks

Share this post


Link to post
Share on other sites

I was actually looking for something just like this. Thank you so much. Now, just one question to take it a step further. Is it possible to write a shortcut that terminates one application and launches another? For example, I use RocketDock on my desktop because I prefer it to the native quicklaunch. I want to be able to launch games off RocketDock, but whenever I do, there is a strange flicker and I'm forced to ALT+TAB back to the desktop and shut it off manually. Is there a way to write a shortcut that will both close RocketDock and launch another app?

Share this post


Link to post
Share on other sites

It was just what I needed except for one thing.

Posted Image I've come across a couple more 'quirks' as I've been using it.

The filename cannot have spaces - had to replace them with underscores '_'

I had one path that had an ampersand '&' in it - it couldn't open the file.

These may just be typical characteristics of using DOS commands, I don't know much about that. Posted Image

Share this post


Link to post
Share on other sites

I normally use this script for opening the folders and applications that I need to work from a single batch file.The batch can be programmed to do whatever we need to do on a regular basis, it can be use to save time and automate tasks.

Share this post


Link to post
Share on other sites

Posted Image I've come across a couple more 'quirks' as I've been using it.

The filename cannot have spaces - had to replace them with underscores '_'

I had one path that had an ampersand '&' in it - it couldn't open the file.

These may just be typical characteristics of using DOS commands, I don't know much about that. Posted Image

I have a .bat file that executes the following when I want to play Dota on dota-league:

 

@echo offcd C:\Program Files\Games\Warcraft III\DGNstart DotAClient.execd..start inventory.exe"Frozen Throne.exe"

In the folder "C:\Program Files\Games\Warcraft III\DGN" I have the DotaClient and in the folder under it "C:\Program Files\Games\Warcraft III" I have Frozen Throne and an inventory add-on. With the command "cd.." (without "") I can go one folder down in dos and it also works when coding.

 

My point here is, that in most cases you don't (but to be sure you usually can) need to add start in front of the application you're executing and especially if the application has two words cut the start and just add "program name .exe" and it will execute it.

 

Hope this helps.

Share this post


Link to post
Share on other sites

To fix the problem with multiple drives, you need to first change to that drive and then change to the directory of the .exe. For example, if you have Guild Wars.exe on your C: drive and Firefox.exe on your D: drive, you code would be:rem Guild Warscd C:\Program Files\Guild Warsstart gw.exerem Firefoxrem changing to D: driveD:rem changing to the root of D:cd \cd D:\Program Files\Mozilla Firefoxstart firefox.exeAs far as a path that has spaces or special characters, usually Windows XP will work fine with commands with spaces, but if you have problems, always include quotes around your path:"C:\Program Files\Internet Explorer\Connection Wizard"Older Operating Systems like Windows 98 (9x) can't have path segments longer than 8 characters, so you have to truncate the segments like this:"C:\Progra~1\Intern~1\Connec~1"One final note. What I always do when I'm done with my batch file is manually test the commands. I open up the batch file in Notepad (or your favorite text editor) and also open a command prompt. Then I systematically type in each command one at a time, following the commands in my batch file. This allows you to immediately see where your Batch file is getting hung up. Normally when batch files run, the commands are displayed on the screen so fast that if there is an error, you can't see what it was. Typing the commands manually as a test allows you to systematically see what's going on during each step.

Share this post


Link to post
Share on other sites

Thanks!

Start Multiple Programs With One Shortcut

 

Thanks coolcat. Neat trick and easy to do. Now when I start uTorrent, PG2 jumps to the rescue :^)

 

-reply by budser

Share this post


Link to post
Share on other sites

Thanks!

 

Start Multiple Programs With One Shortcut

Thanks coolcat. Neat trick and easy to do. Now when I start uTorrent, PG2 jumps to the rescue :^)

 

-reply by budser


Wow, this is great!

 

here's a question:

is it possible to get the second program to start with a bit of a delay?

 

thanks,

ya

 

EDIT:

 

ok, I am impatient and I managed to find the answer elsewhere. figured i'd leave it here too, in case anybody else is interested.

 

I am using Windows Vista, and this worked for me.

I am also using .bat to execute my shortcuts.

 

Lets say I wanted to start yahoo messenger, and ten seconds later to start windows media player.

 

First of all, using notepad, you have to save these commands:

@ping 127.0.0.1 -n 2 -w 1000 > nul

@ping 127.0.0.1 -n %1% -w 1000> nul

 

and call the file WAIT.bat

 

Then you open a new document and input:

@echo off

start "" "C:\Program Files\Yahoo!\Messenger\YahooMessenger.ex...

CALL WAIT 10

start "" "C:\Program Files\Windows Media Player\wmplayer.exe"

 

the important part is to write the CALL WAIT 10 (or 15, in your case) in between the two programs. When you save this file, name it whatever you want, just remember to save it as a *.bat

 

this works for me!

 

~~~~

Another option is to download the windows resource kit that allows you to do the same thing using a sleep command, supposedly it is simpler than doing all the work outlined above.

http://forums.xisto.com/no_longer_exists/

Edited by yellowalias (see edit history)

Share this post


Link to post
Share on other sites

Many thanks to all.I have been trying to set up a shortcut to open multiple files I use in sequence. A Google search lead me to this page.Using the various methods in this thread I have, thru trial and error, managed to achieve what I wanted.Thanks to allSteve H-reply by Steve Hooper

Share this post


Link to post
Share on other sites

Hi,

I am not sure if this is the best place to ask this question, but is the closest message board to my problem:

I have used some of you tips for scripting a .bat file, so thanks for the help, however I have also combined this with a menu system (not as advanced as it sounds), but I have hit a few issues. The script is below:

@ECHO OFF:STARTCLSECHO ---------------------------------------------ECHO		   CONNECTRIX MANAGER MENUECHO ---------------------------------------------ECHO 1 - Connectrix Manager and Melville Gate LockECHO 2 - Connectrix Manager and Macmerry LockECHO 3 - ExitECHO ---------------------------------------------:QUERYECHO Please SelectGETKEYIF ERRORLEVEL 57 GOTO QUERYIF ERRORLEVEL 51 GOTO L3IF ERRORLEVEL 50 GOTO L2IF ERRORLEVEL 49 GOTO L1GOTO QUERY:L1cd C:\Program Files\Connectrix Manager 9.5\bin\start CtxMgr_Client.batJ:cd \cd J:\Application Infrastructure Services\Storage Services\Disk\Support\Provisioning\EMC Work Plans\ZoningMelville_Gate_Zoning.xlsGOTO START:L2cd C:\Program Files\Connectrix Manager 9.5\bin\start CtxMgr_Client.batJ:cd \cd J:\Application Infrastructure Services\Storage Services\Disk\Support\Provisioning\EMC Work Plans\ZoningMacmerry_Zoning.xlsGOTO START:L3exit
I have a couple of issues:

ISSUE 1 - When I select option 1 the two applications open, however the DOS window goes on a loop with the error message:
Please Select
'GETKEY' is not recognized as an internal or external command,
operable program or batch file.

ISSUE 2 - If I select option 1, there have been times when it has not gone on a loop and both applications open. However if I want to select option 2 after that it does not accept any more input to choose option 2 and therefore I have to close the DOS window and re-open.

ANY IDEAS?

Cheers

Notice from rvalkass:

Please try to use the correct BBCodes where appropriate.
List of BBCodes

Share this post


Link to post
Share on other sites

What should I type if I want to delay the second program in this script?@echo offRem BanlistCd C:Program FilesWC3BanlistStart WC3Banlist.ExeRem TFTCd C:Program FilesWarcraft IIIStart Frozen_Throne.ExeExit-question by Emil

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.