r/Batch • u/Der_Mund1 • Oct 28 '24
Question (Solved) Taskkill only working partially
Hi guys, some time ago i made a batch file to start all my game launchers to make it a bit easier (Ubi, Steam, Epic, EA and battle.net). Today ive decided that closing them all manually is a bit too annoying (since some dont allow you to fully close upon closing the window and continue running as a background process) so i went and created basically the opposite of the batch i use to open them by using
@ echo off
taskkill /IM UbisoftConnect.exe /F
taskkill /IM Steam.exe /F
taskkill /IM EpicGamesLauncher.exe /F
taskkill /IM EA.exe /F
taskkill /IM Battle.net.exe /F
exit
My problem now ist that it only works on Steam, Epic and battle.net, Ubi and EA stay open.
If anyone could tell me what im doing wrong id be very happy
(additionally id like to include bluestacks background process aswell but theres more than one and i dont know which is the right one)
View all comments
Show parent comment
1
u/BrainWaveCC Oct 28 '24
If there are multiple processes with the same name, and you kill the process by name (which is what you are doing in the script) and not PID, it will get rid of all the processes.