Kill Steam Processes (or anything really)

Post Reply
User avatar
LHammonds
Site Admin
Site Admin
Posts: 626
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Kill Steam Processes (or anything really)

Post: # 552Post LHammonds
Thu Dec 14, 2017 9:15 pm

Create a batch file to kill specific services on demand for whatever reason.

Example.bat

Code: Select all

@ECHO OFF
TITLE Verifying Steam Processes Are Not Running
CLS

:FINDEXE
ECHO Checking if tasks are running...
TASKLIST /FI "IMAGENAME eq steam.exe" | FIND /I /N "steam.exe" > NUL
IF "%ERRORLEVEL%"=="0" GOTO KILL1
TASKLIST /FI "IMAGENAME eq SteamService.exe" | FIND /I /N "SteamService.exe" > NUL
IF "%ERRORLEVEL%"=="0" GOTO KILL2
TASKLIST /FI "IMAGENAME eq steamwebhelper.exe" | FIND /I /N "steamwebhelper.exe" > NUL
IF "%ERRORLEVEL%"=="0" GOTO KILL3
GOTO DONE

:KILL1
ECHO.
ECHO Killing Steam.exe
ECHO.
TASKKILL /F /IM steam.exe
PING 127.0.0.1 -n 3 > NUL
GOTO FINDEXE

:KILL2
ECHO.
ECHO Killing SteamService.exe
ECHO.
TASKKILL /F /IM SteamService.exe
PING 127.0.0.1 -n 3 > NUL
GOTO FINDEXE

:KILL3
ECHO.
ECHO Killing SteamWebHelper.exe
ECHO.
TASKKILL /F /IM steamwebhelper.exe
PING 127.0.0.1 -n 3 > NUL
GOTO FINDEXE

:DONE
ECHO.
ECHO No Steam process is running.

Post Reply