Stop processes .bat or .exe file

By plasma dragon00 ยท 9 replies
Jan 15, 2008
  1. 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 :)
  2. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

  3. plasma dragon00

    plasma dragon00 TS Rookie Topic Starter Posts: 172

    thank you so much :) :) :)
  4. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    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
  5. plasma dragon00

    plasma dragon00 TS Rookie Topic Starter Posts: 172

    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...

    taskkill /im iTunes.exe
    taskkill /im TrueTransparency.exe
    for starting programs...

    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)

    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.


    EDIT: one last quick thing. it shouldnt matter whether its a .bat or .exe file, right?
  6. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    You can also check out CALL

    Yes use the entire path (I do - hence CD)

    No I don't use that
    Unless you know the process ID Explorer.exe is starting see: Filemon
    Start the program and check Filemon, to what got started
    Can be difficult to use the first time, it does have a pause option
  7. plasma dragon00

    plasma dragon00 TS Rookie Topic Starter Posts: 172

    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.

    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
  8. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    Why do you have to restart

    just taskill the process in windows
  9. plasma dragon00

    plasma dragon00 TS Rookie Topic Starter Posts: 172

    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.
  10. kimsland

    kimsland Ex-TechSpotter Posts: 14,523

    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)


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

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

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...