Batch File to Open Multiple Programs

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

davisa30

Thread Starter
Joined
Jul 12, 2006
Messages
5
Hello - newbie here. I use Windows XP mostly at work. I have to open about 10+ programs every day when I log onto our network. I'd like to create a some type of batch file that would quickly open all the various programs I need. It takes me few minutes to get everything open and it's particularly annoying when something goes wrong and I have to start all over again.

I must say I don't know about creating batch files so I need very basic and specific help. I'm not even sure if it's possible or not to make such a batch file. All the programs I use have desktop icons.

Any help would be appreciated. If I'm in the wrong area, let me know

Andy D
 
Joined
Jul 11, 2003
Messages
1,429
davisa30 said:
. All the programs I use have desktop icons.



Andy D
welcome, I don't see why you would need a batch file why not put them in the start up folder.
open

C:\Documents and Settings\"your user name"\Start Menu\Programs\Startup
drag the icons into that folder and they should auto run when you log in
 

davisa30

Thread Starter
Joined
Jul 12, 2006
Messages
5
I tried to do what you said but when I drag it over I get a message that says "ERROR MOVING FILE OR FOLDER - Cannot move xxxxx: access is denied". I guess that is thanks to our unhelpful IS Dept.

Andy
 
Joined
Jul 11, 2003
Messages
1,429
The ones you get a error for try right click create shortcut, then drag the shortcut into the startup folder.
 
Joined
Aug 30, 2004
Messages
2,311
Correct, you should just put shortcut icons into your Startup folder, not the actual program or file.

The reason you don't want to put a program file on the Startup folder is that some programs may require other auxiliary files; and your either moving the program file into the Startup, or copying the program file there, does not get those other files there.

You avoid that by just putting the shortcut icon into Startup. The program is still where it belongs, with easy access to those other files, if needed.
 
Joined
Sep 19, 2003
Messages
11
you might like to try Batchrun, it's freeware and quite handy...
" http://www.outertech.com/index.php?_charisma_page=product&id=1"
 

davisa30

Thread Starter
Joined
Jul 12, 2006
Messages
5
Thanks for the help everyone. I tried dragging the shortcut to the Start file and it works great. One thing though, I need several copies of the same program open. I tried dragging multiple shortcuts but only one opens with error messages on the others. I tried changing the name a little and that didn't help either. Any ideas how to get more than one copy of the same program to open from the start file?

Thanks,

Andy
 
Joined
Jul 11, 2003
Messages
1,429
A idea off what program might be nice as some programs won't allow multi runnings .
 

davisa30

Thread Starter
Joined
Jul 12, 2006
Messages
5
The program I need mutiple copies of is our in house customer service system. It runs from our Sun mainframe. The program is not canned software, but was developed by our programming dept. I always run multiple copies (at least 3 or 4) at all times
 
Joined
Jul 11, 2003
Messages
1,429
I take it you can open it once and then need to open multi windows the same program?
I would be looking at a "macro" program to do the opening for you.:D or you will need to do some hand movement to open things:)
 

davisa30

Thread Starter
Joined
Jul 12, 2006
Messages
5
OK, then. I don't know what you mean about a macro program but I'll enjoy what you've help me accomplish and open the other copies manually. Thanks
 
Joined
Aug 30, 2004
Messages
2,311
Since you already know that your program allows multiple instances, of it, open at the same time, then there ought to be a way of getting those multiple instances open using just the shortcut icons in your Startup folder.

However, just having slightly renamed icons to the exact same program file is probably not going to work, as you have already found out. The reason is that the "Target" line (which is really a command line) of the shortcut icon is still identical in each shortcut icon there.
For example, if you open the Properties of one of those shortcut icons, and select the "Shortcut" tab, you may see something like this:
"C:\Program Files\SomeCompany\In House System\OurService.exe"

You may need to ask someone, in your company, as to what parameters are needed to follow that command line to open up a single directed instance, and then include that, slightly altered, for each Shortcut icon in your Startup folder.

For example, suppose the command line needs to have a file named after it, then the Target line might look like this:
"C:\Program Files\SomeCompany\In House System\OurService.exe" doc1.svc
and another instance, for the second shortcut icon then might be:
"C:\Program Files\SomeCompany\In House System\OurService.exe" doc2.svc
and another might be:
"C:\Program Files\SomeCompany\In House System\OurService.exe" doc3.svc
etc.

Or, (again after verifying with the developers of your in-house service software), it might require a "switch" (which usually is preceded with a slash "/") after the command, such as:
"C:\Program Files\SomeCompany\In House System\OurService.exe" /newwindow
and subsequent Shortcut Target lines might use that exact same Target (command) line.

OR! perhaps it might be a combination of both, like:
"C:\Program Files\SomeCompany\In House System\OurService.exe" /newwindow doc1
then
"C:\Program Files\SomeCompany\In House System\OurService.exe" /newwindow doc2

Check with the developers of your software. I'll bet it can be done.
 

JohnWill

Retired Moderator
Joined
Oct 19, 2002
Messages
106,429
You can also use the START batch command, it has lots of options for starting multiple applications.

C:\START /?

Starts a separate window to run a specified program or command.

START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]

"title" Title to display in window title bar.
path Starting directory
B Start application without creating a new window. The
application has ^C handling ignored. Unless the application
enables ^C processing, ^Break is the only way to interrupt
the application
I The new environment will be the original environment passed
to the cmd.exe and not the current environment.
MIN Start window minimized
MAX Start window maximized
SEPARATE Start 16-bit Windows program in separate memory space
SHARED Start 16-bit Windows program in shared memory space
LOW Start application in the IDLE priority class
NORMAL Start application in the NORMAL priority class
HIGH Start application in the HIGH priority class
REALTIME Start application in the REALTIME priority class
ABOVENORMAL Start application in the ABOVENORMAL priority class
BELOWNORMAL Start application in the BELOWNORMAL priority class
WAIT Start application and wait for it to terminate
command/program
If it is an internal cmd command or a batch file then
the command processor is run with the /K switch to cmd.exe.
This means that the window will remain after the command
has been run.

If it is not an internal cmd command or batch file then
it is a program and will run as either a windowed application
or a console application.

parameters These are the parameters passed to the command/program


If Command Extensions are enabled, external command invocation
through the command line or the START command changes as follows:

non-executable files may be invoked through their file association just
by typing the name of the file as a command. (e.g. WORD.DOC would
launch the application associated with the .DOC file extension).
See the ASSOC and FTYPE commands for how to create these
associations from within a command script.

When executing an application that is a 32-bit GUI application, CMD.EXE
does not wait for the application to terminate before returning to
the command prompt. This new behavior does NOT occur if executing
within a command script.

When executing a command line whose first token is the string "CMD "
without an extension or path qualifier, then "CMD" is replaced with
the value of the COMSPEC variable. This prevents picking up CMD.EXE
from the current directory.

When executing a command line whose first token does NOT contain an
extension, then CMD.EXE uses the value of the PATHEXT
environment variable to determine which extensions to look for
and in what order. The default value for the PATHEXT variable
is:

.COM;.EXE;.BAT;.CMD

Notice the syntax is the same as the PATH variable, with
semicolons separating the different elements.

When searching for an executable, if there is no match on any extension,
then looks to see if the name matches a directory name. If it does, the
START command launches the Explorer on that path. If done from the
command line, it is the equivalent to doing a CD /D to that path.
 
Joined
Aug 30, 2004
Messages
2,311
Note: Since multiple shortcut icons in your Startup folder does not get multiple instances of your program going, then using the batch command will probably still not get multiple instances of your program going, UNLESS you know of the syntax of how to do so. Which is what I wrote earlier.

Once you do know the correct syntax, then either
the multiple shortcut icons in your Startup folder OR
the batch file, as JohnWill suggests, will work.

But to create the batch file will require you to create the batch file and still place it somewhere in the startup process, where your PC will use it. Which could be as simple as just placing the batch file - or a shortcut to the batch file, in your Startup folder; or using some startup tool/software that will effectively handle that for you.

For simplicity, and not needing to understand batch files (which I do, but you may not), I'd just place the individual shortcut icons in the Startup folder.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

No members online now.
Top