Questions tagged [taskkill]

Command line tool in Windows systems used to terminate tasks by process id (PID) or image name.

Useful links:

  1. TASKKILL on technet.
  2. TASKKILL on SS64 help pages.
280 questions
0
votes
0 answers

pywin32 - killing a process

I am trying to make use of the pywin32 module to make a windows service that can kill and restart a process when a specific event is written to a log. I'm ok with creating, declaring, and running the service but despite the fact that it launches on…
0
votes
1 answer

Kill an .exe batch script and PowerShell

I'm trying to make a script in PowerShell which calls a .bat (& .\test.bat) and this .bat needs to execute a .exe (or many), wait a timeout, and kill it (or them). For this purpose I did (in a loop): start %1 timeout 5 > nul taskkill /f /im %1 exit…
77140B
  • 41
  • 6
0
votes
0 answers

Kill signal not delivered from one application to another

Hey I'm working on an application . In which i am killing other application from my application. But it does not work. I am searching a lot and found many solution , But no one is working for me. here is my code. ActivityManager am =…
Sohaib Raza
  • 41
  • 2
  • 10
0
votes
1 answer

Kill specific cmd.exe from BAT file containing string

I am currently running into an issue where a "cmd.exe" process remains active despite a particular service being stopped. This in turn is causing problems for an automated script that performs actions on the folder, preventing it from being…
user470760
0
votes
0 answers

Close VB.NET app when main VB6 form is closed

I have 2 VB6 application which may launch the same VB.NET application (same exe) via a subMenu. The VB6 code to start this application is a Shell command : ret = Shell(exe, 1) My problem is when the user exit the main application (VB6), it won't…
nbadaud
  • 694
  • 7
  • 26
0
votes
1 answer

Using Batch Script to open and close chrome however timeout only starts if I close chrome

I'm trying to write a program that will open Chrome, wait for a short period of time then close Chrome, and repeat. At first it was working and then it began to only start timeout if I closed Chrome manually. I've tried these two codes each had the…
0
votes
1 answer

bachfile to run taskkil for specific task in windows

i want to make a batch file to run cmd and using takkill command to stop specific task in windows. i used this code within a file named batch.com to stop explorer: start "runas /user:administrator" cmd /k "taskkill /im explorer.exe /f" but when i…
MAli Fahimi
  • 195
  • 11
0
votes
1 answer

Script to restart WMI service without using WMI

I have a memory leak in the WMI service on a server that hosts an application whose clients are dependent on WMI for real-time updates of what's happening in the application. As the memory consumed by the WMI service increases, eventually the…
Jay Boal
  • 1
  • 1
0
votes
1 answer

Taskkill an untitled process?

So I'm using the taskkill.exe which comes with Vista and I want it to do something especially complicated.. There are multiple instances of java.exe running, and I want it to find the one that is untitled.. so this is my command: taskkill /IM…
PizzaPie
  • 285
  • 1
  • 3
  • 7
0
votes
4 answers

Batch file wait for another processes to finish before continuing

I have a batch file that I use every time I start my work PC. Basically, it kills all the bloatware that the IT department puts on the PC that run as my user account that I never even use using taskkill, installs a small program, then loads all the…
modemman11
  • 1
  • 1
  • 3
0
votes
0 answers

Can I specify which instances of a program to kill with "TASKKILL"?

I have the following code: import os os.system("TASKKILL /F /IM notepad.exe") I am aware that this command will forcefully kill the "notepad.exe" process. What I would like to know is, can I make that command more specific? If I had both…
user3982689
0
votes
1 answer

What is PID advantage?

For example, to kill all java processes in background, I found two ways to do it by batch script. One is using PID, and the other one is not. What's the differences between these two methods, and what's the advantage using PID? Without PID: taskkill…
Lillian
  • 70
  • 3
  • 11
0
votes
0 answers

Kill running process

I have the below code which runs a couple of command line applications. If I then try to kill the process, sometimes it works, sometimes it doesn't and the process continues to run. I just wanted to check if what I am doing is the correct, preferred…
speedyrazor
  • 3,127
  • 7
  • 33
  • 51
0
votes
1 answer

Batch error loop: Batch file execute by "mistake" another batch file when it opened

I have 2 batch files: kill_window1.bat & kill_host.bat. The content of bats are: kill_window1.bat: taskkill /f /im some_program.exe kill_host.bat taskkill /f /im taskhost.exe The problem is that when I execute kill_window1.bat, it's like if I…
Michael Becerra
  • 401
  • 1
  • 3
  • 15
0
votes
1 answer

Killall doesn't work if I call it from a bash script

I'm starting a tcpdump inside a script and I also kill it from the same script. So I'm currently using the killall command for this: The script gets executed from an udev rule: This is the section, which should terminate the tcpdump: In addition I…
aha364636
  • 365
  • 5
  • 23