Start Windows Task Manager by command-line (or batch file)

Archived from groups: microsoft.public.win2000.general (More info?)

Hi to all,
batch file launched by desktop shortcut (WinNT, win2000 e WinXp). Its task
is to do some elaboration if and only if some processes are inactive, that
is if the user had first stopped the application.

Is that possible inside a batch file?
I know executable's names (the same appeared into Windows Task Manager
Processes table), how could I discover if there are active processes with
that name?
And if I would to kill them?

It would be enough to start Windows Task Manager (taskmgr.exe) by
command-line/batch file but I didn't reach it!
It must be possible to do that!
Almost all executables can be launched by shell with some flag to hide their
GUI.
I just need to:
1. start Windows Task Manager inside my batch file
2. list all active processes
3. discover the wanted-processes (if there are...)
4. kill them

Note: I strongly prefer no turn to external program, it would be better to
do all that only with Windows resources, (otherwise I need to install that
program too...)

Thanks in advance, ciao
G.


P.S. Sorry if I post here, if you know a more concerning newsgroup, please
signal it to me.


--

---
Rimuovi il testo in maiuscolo (CANCELLA e QUESTO) dall'indirizzo di reply
per rispondermi, grazie
---
Remove capital text (CANCELLA and QUESTO) from reply address to write me,
thanks
4 answers Last reply
More about start windows task manager command line batch file
  1. Archived from groups: microsoft.public.win2000.general (More info?)

    "Giuseppe R." <giuseppe_ronchiCANCELLA@QUESTOhotmail.com> wrote in message
    news:eELOQjPNFHA.2464@TK2MSFTNGP10.phx.gbl...
    > Hi to all,
    > batch file launched by desktop shortcut (WinNT, win2000 e WinXp). Its task
    > is to do some elaboration if and only if some processes are inactive, that
    > is if the user had first stopped the application.
    >
    > Is that possible inside a batch file?
    > I know executable's names (the same appeared into Windows Task Manager
    > Processes table), how could I discover if there are active processes with
    > that name?
    > And if I would to kill them?
    >
    > It would be enough to start Windows Task Manager (taskmgr.exe) by
    > command-line/batch file but I didn't reach it!
    > It must be possible to do that!
    > Almost all executables can be launched by shell with some flag to hide
    their
    > GUI.
    > I just need to:
    > 1. start Windows Task Manager inside my batch file
    > 2. list all active processes
    > 3. discover the wanted-processes (if there are...)
    > 4. kill them
    >
    > Note: I strongly prefer no turn to external program, it would be better to
    > do all that only with Windows resources, (otherwise I need to install that
    > program too...)
    >
    > Thanks in advance, ciao
    > G.
    >
    >
    > P.S. Sorry if I post here, if you know a more concerning newsgroup, please
    > signal it to me.
    >
    >
    >
    > --
    >
    > ---
    > Rimuovi il testo in maiuscolo (CANCELLA e QUESTO) dall'indirizzo di reply
    > per rispondermi, grazie
    > ---
    > Remove capital text (CANCELLA and QUESTO) from reply address to write me,
    > thanks
    >
    >

    To launch the Task Manager: taskmgr.exe
    To list all current tasks: tlist.exe or pulist.exe (Windows Resource Kit)
  2. Type taskmgr at start->run
  3. You can use the following:

    Taskkill /?

    at a command prompt to work out the syntax but to kill a process you could use

    TASKKILL /F /IM iTunes.exe /T

    This would kill FORCEFULLY (/F) the process iTunes (/IM) and all child processes (/T) that were from it.

    Hope this helped.

    TechTank
  4. Quote:
    Archived from groups: microsoft.public.win2000.general (More info?)

    Hi to all,
    batch file launched by desktop shortcut (WinNT, win2000 e WinXp). Its task
    is to do some elaboration if and only if some processes are inactive, that
    is if the user had first stopped the application.

    Is that possible inside a batch file?
    I know executable's names (the same appeared into Windows Task Manager
    Processes table), how could I discover if there are active processes with
    that name?
    And if I would to kill them?

    It would be enough to start Windows Task Manager (taskmgr.exe) by
    command-line/batch file but I didn't reach it!
    It must be possible to do that!
    Almost all executables can be launched by shell with some flag to hide their
    GUI.
    I just need to:
    1. start Windows Task Manager inside my batch file
    2. list all active processes
    3. discover the wanted-processes (if there are...)
    4. kill them

    Note: I strongly prefer no turn to external program, it would be better to
    do all that only with Windows resources, (otherwise I need to install that
    program too...)

    Thanks in advance, ciao
    G.


    P.S. Sorry if I post here, if you know a more concerning newsgroup, please
    signal it to me.


    --

    ---
    Rimuovi il testo in maiuscolo (CANCELLA e QUESTO) dall'indirizzo di reply
    per rispondermi, grazie
    ---
    Remove capital text (CANCELLA and QUESTO) from reply address to write me,
    thanks


    very simple, open a notepad, then type "taskmgr" without the "quotations" and then save it as a .bat file! =D
Ask a new question

Read More

Task Manager Command Line Windows