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