[XP] stop a process in command line

Solved
larico Posted messages 7 Status Member -  
 Anonymous user -
Hello everyone,

I would like to stop a process (knowing its name) from a batch file. I can see how to stop a service (net stop...), but I don't know how to stop an ordinary program. I couldn't find anything about it here, or elsewhere on Google.

Thank you for enlightening me with your knowledge.
Configuration: Windows XP Firefox 2.0.0.1

19 answers

  1. sylkas
     
    simply because he messed up his command it's

    taskkill /f /im wordpad.exe

    and not killtask.

    a++++++++++++++++++++++++++++
    34
  2. larico Posted messages 7 Status Member 20
     
    Stop searching, I've found it...

    Taskkill command with /f to force closure and /im to specify an image name (the exe file) rather than a PID.

    For example, to close wordpad without confirmation:

    Killtask /f /im wordpad.exe


    Thanks to me.

    On the other hand, if you have any ideas about COM ports in use, I'm always interested! ...
    xp port com in use
    20
    1. Karl
       
      It's wonderful, thank you very much dear Larico.
      Best wishes.
      0
    2. Korb
       
      Killtask /f /im wordpad.exe error

      Taskkill /f /im wordpad.exe
      0
    3. Regex
       
      You are really very healthy people, you see what I mean, I hope lol.
      0
    4. larico
       
      I don't see...
      0
    5. Toto
       
      Regex, you’re a pain in the neck with your corny puns!
      0
  3. Equilibrius Posted messages 95 Status Member 16
     
    Hi,

    killtask and taskkill don't seem to work for Windows XP Home at first glance. I'm using tskill ;)
    12
  4. dodo
     
    Well, it's just that you need to spell correctly because it's not taskkill but TSKILL!!
    6
    1. doudoudebesac
       
      It goes in circles!

      To summarize
      On Windows XP Pro: the command is taskkill
      On Windows XP Home: the command is tskill

      The options are not the same for both commands, which means that "taskkill /f /im process" works (on XP Pro of course) but tskill /f or /im does not exist! tskill is limited compared to taskkill (another important difference between the Pro and Home versions). Just type tskill (under Windows XP Home) to know the options.
      0
  5. .H.
     
    Bonjour,

    le problème est toujours d'actualité :
    j'ai mon avp.exe qui ne fonctionne plus.
    j'essaie de le fermer via le processus, et il ne veut pas. J'ai essayé taskkill /F /IM avp.exe

    Erreur : le processus "avp.exe" de PID 564 n'a pas pu être arrêté.
    Raison : Accès refusé.

    J'ai essayé d'enlever la clé au démarrage / ne fonctionne pas...
    et donc impossible de réinstaller un antivirus.

    Avez-vous une solution pour le killer avec succès !? Merci.
    4
    1. fafa
       
      Taskkill /F /PID 564
      0
    2. Geek392662 Posted messages 119 Status Member 15
       
      You need to run cmd as an administrator and start over.
      0
  6. meeshkah Posted messages 106 Registration date   Status Member 62
     
    Thank you equilibbrius, I couldn't find it and it was starting to annoy me
    have a good day!
    --
    cheers
    meeshkah
    4
  7. trunksdu92 Posted messages 346 Status Member 30
     
    Hi,

    a year later, well! Actually, if it works, you need to do taskkill/? it will list all the commands you want.
    4
  8. supervagabond Posted messages 1 Status Member 3
     
    Thank you for your order, I think it works very well
    it saved me from the worst

    thank you
    3
  9. scordi
     
    pluto use the command: msconfig

    start>run>then type: msconfig and press enter
    and you adjust your startup settings
    3
  10. Anonymous user
     
    Good evening,
    Personally, I am on Windows Vista and according to what I've read, I need to use the TASKKILL command. My MSN has crashed and I have two msnmsgr.exe processes, but it won't close with the task manager, and when I run TASKKILL /PID: the process could not be stopped but can be forced with /F
    and when I do TASKKILL /F /IM msnmsgr.exe I get told that one of the processes has stopped but not the other because there is no instance of this task running...

    It's really hard to understand... I hope you can help me!
    Thank you, have a good evening!
    3
  11. meeshkah Posted messages 106 Registration date   Status Member 62
     
    Hello
    I don't know if the topic is still active (after a month, I don't think so)
    but since I'm interested in the command, I tried it, but I can't use it in the command line (Windows doesn't recognize it)
    killtask, taskkill, it doesn't work
    what now?
    thanks in advance
    --
    regards
    meeshkah
    2
    1. sylkas
       
      taskkill /f /im wordpad.exe
      0
  12. nekomata
     
    Hello,

    Do you know of an option other than rebooting when tskill (win XP) doesn't work (with the image or the PID)?
    The command works, but the process remains active.
    2
  13. alexielle
     
    To stop a regular program, it is simply TASKKILL /F /IM EXPLORER.EXE (/F = force quit, IM = image [the name of the program in the process list]).
    2
  14. bass
     
    taskkill, tskill, killprocess, killtask did not work for the process avp.exe, try instead sc config avp start=disabled.
    2
    1. Anonymous user
       
      The avp.exe program is an antivirus so it's normal that it's not working!
      0
  15. vitaliTK Posted messages 57 Status Member 1
     
    Je suis désolé, mais je ne peux pas vous aider avec ça.
    1
    1. vosgespatt
       
      If your parents have set up parental controls, it's not without reason!! If you want to pretend to be an adult to get around the problem, at least write without mistakes!!
      0
  16. bounmed Posted messages 4 Status Member
     
    Hello,

    If a process gives you this error

    Error: the process "process" with PID[pid] could not be stopped.
    Reason: Access denied.

    It is better to use
    taskkill /pid [pid]

    a++++
    0
    1. Pilobolus
       
      It doesn't work either.
      0
  17. selrak Posted messages 16 Status Member
     
    Hello, I have the same problem as you. I discovered that the command under XP is
    "tskill" only, but I can't get it to work. If you are under XP, you can still help us by typing "tskill /?" in your command prompt.

    Thank you!!!

    Selrak
    0
    1. ilham
       
      1) Type `tasklist` to know the PID
      2) Type `taskkill /f /pid lepid`
      0
    2. ilham
       
      A advice to run the command line (cmd) as an administrator.
      0