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. |
Re: Execute Multiple Programs
|
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. |
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 :|
|
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.
|
Re: Execute Multiple Programs
My cmd prompt doesn't seem to recognise taskkill as I said.
|
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 |
Re: Execute Multiple Programs
Quote:
Rainlendar becomes RAINLE~1 etc... file names too Rainlendar.exe becomes RAINLE~1.EXE http://www.microsoft.com/technet/arc....mspx?mfr=true |
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. |
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.
|
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? |
Re: Execute Multiple Programs
Code:
@echo off |
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 |
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 |
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. |
Re: Execute Multiple Programs
Try running the batch file at the command prompt.
|
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) |
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. |
Re: Execute Multiple Programs
Quote:
|
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