Planetarion Forums

Planetarion Forums (https://pirate.planetarion.com/index.php)
-   Hardware and Tech Support (https://pirate.planetarion.com/forumdisplay.php?f=64)
-   -   Execute Multiple Programs (https://pirate.planetarion.com/showthread.php?t=191395)

Androme 25 Jun 2006 11:28

Execute Multiple Programs
 
I've searching on Google but obviously the terms I'm using aren't returning anything that make sense.

I want to be able to, at the click of a button or something, to have several programs load up instead of me clicking on them each individually.

Thanks.

SYMM 25 Jun 2006 12:31

Re: Execute Multiple Programs
 
http://forums.windowsforum.org/index...howtopic=18948

Androme 25 Jun 2006 12:46

Re: Execute Multiple Programs
 
Cheers mate. But it doesn't work. The path points exactly to the program locations I've made sure they're closed but they don't open.

start C:\Program Files\WinBar\WinBar.exe
start C:\Program Files\Rainlendar\Rainlendar.exe
exit

Also, is there a way to close programs/processes from within a batch as well without linking to its PID? TASKKILL or KILL don't seem to exist according to CMD.

SYMM 25 Jun 2006 13:32

Re: Execute Multiple Programs
 
try without the 'start', but I don't have any experience of doing such things. I just searched for ".bat launch multiple programs" and that was one of the top results :|

pablissimo 25 Jun 2006 15:27

Re: Execute Multiple Programs
 
Put quote marks round the paths, I dont think it's going to enjoy the space in Program Files. You can kill a process with taskkill as shown here.

Androme 25 Jun 2006 16:07

Re: Execute Multiple Programs
 
My cmd prompt doesn't seem to recognise taskkill as I said.

pablissimo 25 Jun 2006 16:14

Re: Execute Multiple Programs
 
Oh sorry. It's sat in windows\system32 on my box.

Erm, I could try mailing mine if you PM me an email addy

Edit: Or use pskill

Luckeh!!!! 25 Jun 2006 17:01

Re: Execute Multiple Programs
 
Quote:

Originally Posted by Androme2
Cheers mate. But it doesn't work. The path points exactly to the program locations I've made sure they're closed but they don't open.

start C:\Program Files\WinBar\WinBar.exe
start C:\Program Files\Rainlendar\Rainlendar.exe
exit

Also, is there a way to close programs/processes from within a batch as well without linking to its PID? TASKKILL or KILL don't seem to exist according to CMD.

try use the MSDOS folder names, eg program files becomes PROGRA~1
Rainlendar becomes RAINLE~1 etc...

file names too
Rainlendar.exe becomes RAINLE~1.EXE

http://www.microsoft.com/technet/arc....mspx?mfr=true

pablissimo 25 Jun 2006 17:03

Re: Execute Multiple Programs
 
Filenames do it too, but quote marks should really take care of it.

It's best to experiment with these things on the commandline anyway, just so you can see what errors come up when you try doing what you're doing (instead of a cmd window just popping then disappearing straight away after a ****up).

If you want to keep the window open after for debugging, throw a call to 'pause' in.

Edit:
I can't see to get start to work with quote marks actually, Luckeh's plan seems the best.

Dante Hicks 25 Jun 2006 17:48

Re: Execute Multiple Programs
 
Some programs might require you to change paths to their directory before running so you might want to do all the 'c:', , 'cd \' , 'cd "program files"', etc stuff first before running it.

Androme 25 Jun 2006 18:10

Re: Execute Multiple Programs
 
Thanks for all the help guys but still no luck. I've tried abbreviating paths longer than six chars to ~1 after the 6th char of each dir & filename, done the /D switch, tried a space.

Hmm :/


EDIT: Well this is odd. Doing "start c:\progra~1\winbar\winbar.exe" WORKS if I manually open up command prompt and type that in without the quotes but if I do that in a batch file, it doesn't work. Eh?

Phil^ 25 Jun 2006 18:43

Re: Execute Multiple Programs
 
Code:

@echo off
cd c:\program files\mozilla firefox\
firefox.exe
cd c:\program files\putty
putty.exe
cd c:\program files\openoffice.org 2.0\program\
swriter.exe
echo "Executed all programs"
pause

adapt paths and executables etc to your liking, save as a .bat file and execute.

Androme 25 Jun 2006 22:51

Re: Execute Multiple Programs
 
Cheers Phil but that doesn't seem to want to work either

@echo off
cd C:\Program Files\WinBar\
WinBar.exe
echo "Executed all programs"
pause

Phil^ 25 Jun 2006 22:53

Re: Execute Multiple Programs
 
what error comes up when you do it. Does winbar require any special parameters when you run its executable?
the pause statement should let you see any error messages returned by the batch file before the window closes

Androme 25 Jun 2006 23:07

Re: Execute Multiple Programs
 
I double clicked the batch file and a command prompt opens for literally a split second then closes and nothing opens up.

Winbar doesn't - I know that because typing start c:\program files\winbar\winbar.exe works in cmd.

Dante Hicks 25 Jun 2006 23:13

Re: Execute Multiple Programs
 
Try running the batch file at the command prompt.

JammyJim 25 Jun 2006 23:16

Re: Execute Multiple Programs
 
10 cls
20 print "lollerskates ftw!1122"
30 shell "c:\progra~1\windows\sndrec32.exe"
40 print "SOUND RECORDER LOADED MR KIPLING.. ALL HANDS TO BATTLESTATIONS"
50 goto 40


(download qbasic or the such and use that if batch files dont work)

Androme 25 Jun 2006 23:25

Re: Execute Multiple Programs
 
LOL Cheers JJ - I happen to know basic but didn't know you could use the shell command.

Dante - that defeats the purpose of a "1-click" thing. Thanks though.

Dante Hicks 25 Jun 2006 23:41

Re: Execute Multiple Programs
 
Quote:

Originally Posted by Androme2
Dante - that defeats the purpose of a "1-click" thing. Thanks though.

Yeah I know that dude, I was suggesting as a method of seeing if you get an error msg (not as a permanent alternative).

pablissimo 26 Jun 2006 12:17

Re: Execute Multiple Programs
 
If it works by executing the batch file from the command prompt, you coullllld try making a shortcut (clickable joy) whose program to execute is 'start myfile.bat' I guess. Once it works in the batch file of course.


All times are GMT +1. The time now is 10:47.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018