Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
Mann

taskkill

Recommended Posts


I think that's a Windows XP Pro integrated component, i don't think it'll work on Home, but you can give it a try, I do not know if it is allowed to post parts of window's software.

Share this post


Link to post
Share on other sites

does anyone know how to use the task kill in windows XP. I read the web site on microsoft.com, but i don't understand al of it. :)

anyone have a simplified version? :rolleyes:

Share this post


Link to post
Share on other sites

Here is the switches and help info for taskkill

TASKKILL [/S system [/U username [/P [password]]]]
        { [/FI filter] [/PID processid | /IM imagename] } [/F] [/T]

Description:
   This command line tool can be used to end one or more processes.
   Processes can be killed by the process id or image name.

Parameter List:
   /S    system           Specifies the remote system to connect to.

   /U    [domain\]user    Specifies the user context under which
                          the command should execute.

   /P    [password]       Specifies the password for the given
                          user context. Prompts for input if omitted.

   /F                     Specifies to forcefully terminate
                          process(es).

   /FI   filter           Displays a set of tasks that match a
                          given criteria specified by the filter.

   /PID  process id       Specifies the PID of the process that
                          has to be terminated.

   /IM   image name       Specifies the image name of the process
                          that has to be terminated. Wildcard '*'
                          can be used to specify all image names.

   /T                     Tree kill: terminates the specified process
                          and any child processes which were started by it.

   /?                     Displays this help/usage.

Filters:
   Filter Name   Valid Operators           Valid Value(s)
   -----------   ---------------           --------------
   STATUS        eq, ne                    RUNNING | NOT RESPONDING
   IMAGENAME     eq, ne                    Image name
   PID           eq, ne, gt, lt, ge, le    PID value
   SESSION       eq, ne, gt, lt, ge, le    Session number.
   CPUTIME       eq, ne, gt, lt, ge, le    CPU time in the format
                                           of hh:mm:ss.
                                           hh - hours,
                                           mm - minutes, ss - seconds
   MEMUSAGE      eq, ne, gt, lt, ge, le    Memory usage in KB
   USERNAME      eq, ne                    User name in [domain\]user
                                           format
   MODULES       eq, ne                    DLL name
   SERVICES      eq, ne                    Service name
   WINDOWTITLE   eq, ne                    Window title

NOTE: Wildcard '*' for the /IM switch is accepted only with filters.

NOTE: Termination of remote processes will always be done forcefully
     irrespective of whether /F option is specified or not.

Examples:
   TASKKILL /S system /F /IM notepad.exe /T
   TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
   TASKKILL /F /IM notepad.exe /IM mspaint.exe
   TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"
   TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
   TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
   TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"

eg.. to shutdown explorer.exe use taskkill /f /t explorer.exe type it in command prompt..

Share this post


Link to post
Share on other sites

how can i start explorer after programm install that needed explorer killed? if i just put explorer.exe - next programm from my list don`t start installation - as the previous instalation isnt finished because explorer.exe is started and system is waiting for it to quit...

Share this post


Link to post
Share on other sites

I'm not quite sure I understand your question, but I would do this:

restart_exp.bat

taskkill /F /IM explorer.exe
@ping 127.0.0.1 -n 10 -w 1000 > nul
@ping 127.0.0.1 -n %1% -w 1000> nul
explorer.exe

That will kill explorer.exe and wait approximately 10 seconds before restarting it. You might need to change that based on your computer speed and how long you need explorer to disappear. The value to change is the 10 in the second line.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×