Stop processes .bat or .exe file

Status
Not open for further replies.

plasma dragon00

Posts: 169   +0
well, ive made a few before (none like this though), and i have recently been doing a LOT more intense gaming with my computer, where any extra program can drop my framerate to below 40. so before i play ill open up task manager and end all the processes i usually do. now heres the question:

is there a way to make a .bat or .exe file, that, when executed, will end all processes listed in the .bat or .exe file? something like - end explorer.exe

something along those lines. could someone give me a template on how to make one, if its possible? i can insert all of the process names myself, unless you want me to post them all ;)

and another thing - is there a way to make it do the complete opposite of the process listed above? like - start explorer.exe

the second thing is less important, but would be helpful also :) and by the way, explorer.exe was just an example. i dont end that lol, unless my pc is frozen. normally i'll end programs like iTunesHelper.exe, TrueTransparency.exe, etc etc etc....

thanks for the help :)
 
I've made a hundred batch files, to run from Cd (cause there easy to understand)

If you need more specific help let me know
 
well, i already have a question lol

im pretty sure that for the start one i would need to write in the full file directory if it isnt part of windows, right? (like explorer.exe would just work, as opposed to C:\Program Files\TrueTransparency\Truetransparency.exe)

and also, what parameter would i use for the start one? /d Path? i also thought it could have been /b, bot after looking at it a second time the /d one seems like it would be right.

so here are some examples (kept to 2 items each lol), and i have 3. are these right?

for ending a program...

Code:
taskkill /im iTunes.exe
taskkill /im TrueTransparency.exe

for starting programs...

Code:
start /d C:\Program Files\TrueTransparency\TrueTransparency.exe
start /d C:\Program Files\ViStart\ViStart.exe

and, say, to reset explorer.exe in case it hangs (manually doing it normally fixes it)

Code:
taskkill /im explorer.exe
start /d explorer.exe

or would it be...
start FileName explorer.exe ?

once again, thanks a whole bunch for those links. im pretty sure i understand the taskkill one but the start one seems a little more confusing.

well, time to restart my pc so i can get all the normal processes in there lol before i write the taskkill one.

~plasma

EDIT: one last quick thing. it shouldnt matter whether its a .bat or .exe file, right?
 
well, i just made my first end processes file so lets hope that works lol :)

EDIT: its not working... hmm. if i use the /f parameter (ive used it before) where do i put that?

taskkill /im truetransparency.exe /f ?

EDIT 2: hmm cant get it to work... does this code look about right, because this is what im trying to get work.

Code:
taskkill /im iTunes.exe
taskkill /im iPodService.exe
taskkill /im firefox.exe
taskkill /im aolsoftware.exe
taskkill /im TrueTransparency.exe
taskkill /im aawservice.exe
taskkill /im aim6.exe
taskkill /im aolload.exe
taskkill /im AppleMobileDeviceService.exe
taskkill /im avgas.exe
taskkill /im fdm.exe
taskkill /im firefox.exe
taskkill /im InCD.exe
taskkill /im InCDsrv.exe
taskkill /im steam.exe
taskkill /im TrueTransparency.exe
taskkill /im ViStart.exe
 
i meant restart so i can get all the processes back that load at windows startup. i cant remember half of them. that code in my edit above, does that look about right? or am i missing something, because it isnt working.
 
Hi plasma dragon00, had to step out

Now as an example
taskkill /im firefox.exe (that you have in your list)
Once you end the task using the batch program, you can then just run:

call "C:\Program Files\Mozilla Firefox\firefox.exe" (obviously inside the batch, and from a command line)

eg

@echo off
echo Hi plasma dragon00
call "C:\Program Files\Mozilla Firefox\firefox.exe"
echo.
pause
taskkill /im firefox.exe
pause
echo all done
pause
exit

obviously the pause doesn't need to be there
and the echos
 
Status
Not open for further replies.
Back