kill.bat 737 B

1234567891011121314151617181920212223
  1. @setlocal enabledelayedexpansion
  2. @echo off
  3. bcdedit >nul
  4. if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto UACAdmin)
  5. :UACPrompt
  6. %1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
  7. exit /B
  8. :UACAdmin
  9. echo '============================================begin====================================================='
  10. TASKKILL /F /IM spshell.exe
  11. TASKKILL /F /IM guardian.exe
  12. TASKKILL /F /IM cefclient.exe
  13. for /f "tokens=1,2 delims= " %%a in ('tasklist /m ^| findstr "sphost.exe"') do (
  14. echo name=%%a, PID = %%b, and will kill it.
  15. TASKKILL /F /PID %%a
  16. )
  17. echo "=============================================end====================================================="