@echo off REM Name: kill_hp_processes.bat REM Created by: Jim Cameron REM Created on: July 9, 2010 REM Last updated: July 16, 2010 REM Version: 1.2 REM Description: REM Check for errant HP processes: hpboid and hpbpro.exe. REM These processes can start and never end until the system REM is rebooted. When they accumulate they can consume REM significant amounts of memory and potentially CPU cycles REM reaching the point where the system's performance is REM considerably degraded. REM Specify log file set log="c:\kill_hp_processes.log" REM Put the date and time in the log file echo %date% %time% >> %log% REM List the hpboid.exe processes running. tasklist /fi "imagename eq hpboid.exe" >> %log% REM Count the number of hpboid.exe processes running. for /f "delims=" %%a in ('tasklist /fi "imagename eq hpboid.exe" ^| find /c /i "hpboid.exe"') do set numprocesses=%%a echo. echo Number of hpboid.exe processes running: %numprocesses% >> %log% if %numprocesses$ NEQ 0 taskkill /f /fi "imagename eq hpboid.exe" REM List the hpbpro.exe processes running. tasklist /fi "imagename eq hpbpro.exe" >> %log% REM Count the number of hpbpro.exe processes running. for /f "delims=" %%a in ('tasklist /fi "imagename eq hpbpro.exe" ^| find /c /i "hpbpro.exe"') do set numprocesses=%%a echo. echo Number of hpbpro.exe processes running: %numprocesses% >> %log% if %numprocesses$ NEQ 0 taskkill /f /fi "imagename eq hpbpro.exe" REM put a blank line in the file to separate the entries added at this time REM from those that will be added at a later time. echo.