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
1
vote
1 answer

Closing window by title kills explorer in batch

I'm trying to close an open window by its title using batch. I got this from another question: TASKKILL /F /FI "WINDOWTITLE eq titleofwindow" It's called when I first open the batch file (at which point the window it's trying to close isn't open)…
ellm62
  • 33
  • 7
1
vote
2 answers

How to end specific process (.hta) using DOS' taskkill or similar?

Many times I'll have multiple .hta files running, but only want to terminate a specific one. In Task Manager they are all named mshta.exe *32 under the Processes tab, but if I click the Applications tab I'm able to identify the specific .htas to…
Mathomatic
  • 899
  • 1
  • 13
  • 38
1
vote
2 answers

VBS- Can I exit a VBS message box that repeats itself without going to the task manager or cmd?

I have a message box that repeats itself whenever you click ok- which is the only option, by the way. My code: 'Very Annoying script' Set objShell = CreateObject("Wscript.Shell") intMessage = Msgbox("Click ok to say yes",16, "Is this…
Roke
  • 300
  • 1
  • 6
  • 27
1
vote
2 answers

Is it possible to close every application via a batch file?

I already know that the Taskkill /im command can close a specified application. However, can you kill all applications (just the programs, not the background processes and Windows processes) currently running in Windows (so if I had a lot of…
Roke
  • 300
  • 1
  • 6
  • 27
1
vote
2 answers

End a process when another ends, batch

I have Oddworld Abe's Oddysey but the game didn't work well with my GamePad so I had to use Joy2Key, I created a .bat to start both processes but It doesn't work as I want to. I want that when I stop playing the game make the process JoyToKey.exe…
AlexTCGPro
  • 31
  • 8
1
vote
2 answers

Kill "HSSCP.exe *32" using batch

I'm fairly new to batch. I use the Hotspot Shield VPN, and noticed some extra processes running in the background even when it's not turned on (The whole application is shady to me, but I can't find any other reliable free VPNs.) The script I wrote:…
allies4ever
  • 111
  • 2
1
vote
0 answers

How to print the process id of terminated processes in the output?

I have three processes being opened and then i am killing all the three processes as follows: import subprocess DETACHED_PROCESS = 0x00000008 Process1 = subprocess.Popen("C:\learning\A.exe",creationflags=DETACHED_PROCESS,shell=True) print"process id…
kashyap
  • 31
  • 3
1
vote
0 answers

Stopping gobbler threads in blocking reads on Process InputStream

I have a gobbler that reads the output from a Process. There is a case where we kill the process programatically using its PID and the external Windows taskkill command. It is a 16-Bit DOS process We taskkill because it is a DOS 16-bit process and…
The Coordinator
  • 13,007
  • 11
  • 44
  • 73
1
vote
1 answer

how to remove the tray icon after taskkill the application?

I use inno setup to setup my application. Before install, I will check the app is still running, and use taskkill command to kill the application force. But I find the tray icon will not disappear. How to terminate the application gentlely or make…
Nick Sun
  • 141
  • 3
  • 10
1
vote
1 answer

Taskkill no longer works with VLC

I have a batch that used to kill VLC. echo rem choice /c YN /n /d Y /t 120 taskkill /im vlc.exe Now when it runs, VLC stays open, even though the CMD reports the taskkill command was successfully sent. Any ideas? Perhaps a VLC (currently 2.1.5)…
square_eyes
  • 1,269
  • 3
  • 22
  • 52
1
vote
0 answers

How to get description from tasklist or equiv

I have a process (.exe) with a name that is too long. It shows up in tasklist as HOTSPO~1.EXE, but I can see its fullname in Windows Task Manager, under "description". How can I get that information? I need it because I want to grep out the PID of…
ManInMoon
  • 6,795
  • 15
  • 70
  • 133
1
vote
1 answer

taskkill conditional on execution time of the process (Timeout)

Edit: I have updated my question and code. I am running a python script (on hundreds of files) from a batch file. Problem is, python script on some files takes a lot of time to run. What I want is that my python script should not run for more than 5…
Ankit
  • 11
  • 6
1
vote
0 answers

Batch file for killing and starting task on remote PC

Hello there I am looking for help with batch file to kill program, copy files and starting program on remote PCs, killing and copying files is working correctly but starting program is impossible here is what I got so far @echo off SET /P…
1
vote
2 answers

kill process username variable ? (Windows)

Is there a way to kill a process only from the current user with variable %username% ? Let's say I'm logged in so I want to kill the process cmd.exe only in my session but I need this with a variable. I tried this taskkill /F /FI "%username%" /IM…
Dany
  • 119
  • 2
  • 5
  • 11
1
vote
0 answers

Windows 2008R2 :: Taskkill in a scheduled task

I'm using TASKKILL /FI "IMAGENAME eq xyz.exe" /FI "STATUS eq UNKNOWN" /F in a batch which is run as scheduled task. When I run the batch manually, the filters work fine. When I run it from ScheduledTasks with RunNow, all processes of xyz.exe are…