@echo off
ver | find /i "2000" > null
  
if "%errorlevel%"=="0" (
  echo "kill windows 2000 weblct" >> tomcatlog.txt
  tlist -p weblct.exe > tomcatid.txt
  for /f %%a in (tomcatid.txt) do (
  	echo "ntsd kill weblct: %%a" >> tomcatlog.txt
	if "%%a" NEQ "-1" ntsd -c q -p %%a
  )
  del tomcatid.txt
  ) else (
  echo "kill windows xp weblct" >> tomcatlog.txt
    tskill weblct
)