[XP] stop a process in command line

Solved
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. simply because he messed up his command it's

    taskkill /f /im wordpad.exe

    and not killtask.

    a++++++++++++++++++++++++++++
    34
    1. 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. It's wonderful, thank you very much dear Larico.
        Best wishes.
        0
      2. Killtask /f /im wordpad.exe error

        Taskkill /f /im wordpad.exe
        0
      3. You are really very healthy people, you see what I mean, I hope lol.
        0
      4. I don't see...
        0
      5. Regex, you’re a pain in the neck with your corny puns!
        0
    2. 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. taskkill /f /im wordpad.exe
        0
    3. 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. Taskkill /F /PID 564
        0
      2. You need to run cmd as an administrator and start over.
        0
    4. killtask, taskkill: it doesn't work!
      0
      1. 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. It doesn't work either.
          0
      2. Hi,

        killtask and taskkill don't seem to work for Windows XP Home at first glance. I'm using tskill ;)
        12
        1. Thank you equilibbrius, I couldn't find it and it was starting to annoy me
          have a good day!
          --
          cheers
          meeshkah
          4
          1. 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
            1. Thank you for your order, I think it works very well
              it saved me from the worst

              thank you
              3
              1. Hi,

                a year later, well! Actually, if it works, you need to do taskkill/? it will list all the commands you want.
                4
                1. pluto use the command: msconfig

                  start>run>then type: msconfig and press enter
                  and you adjust your startup settings
                  3
                  1. 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
                    1. Well, it's just that you need to spell correctly because it's not taskkill but TSKILL!!
                      6
                      1. 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
                    2. 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
                      1. taskkill, tskill, killprocess, killtask did not work for the process avp.exe, try instead sc config avp start=disabled.
                        2
                        1. The avp.exe program is an antivirus so it's normal that it's not working!
                          0
                      2. Je suis désolé, mais je ne peux pas vous aider avec ça.
                        1
                        1. 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
                      3. 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. 1) Type `tasklist` to know the PID
                          2) Type `taskkill /f /pid lepid`
                          0
                        2. A advice to run the command line (cmd) as an administrator.
                          0