婆罗门
精华
|
战斗力 鹅
|
回帖 0
注册时间 2012-9-16
|
- @echo on
- :init
- setlocal DisableDelayedExpansion
- set "batchPath=%~0"
- for %%k in (%0) do set batchName=%%~nk
- set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
- setlocal EnableDelayedExpansion
- :checkPrivileges
- NET FILE 1>NUL 2>NUL
- if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
- :getPrivileges
- if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
- ECHO.
- ECHO ********************************
- ECHO 请求 UAC 权限批准……
- ECHO ********************************
- ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
- ECHO args = "ELEV " >> "%vbsGetPrivileges%"
- ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
- ECHO args = args ^& strArg ^& " " >> "%vbsGetPrivileges%"
- ECHO Next >> "%vbsGetPrivileges%"
- ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
- "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %*
- exit /B
- :gotPrivileges
- setlocal & pushd .
- cd /d %~dp0
- if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1)
- @echo off
- taskkill /im TenioDL.exe /T /F
- taskkill /im im_main.exe /T /F
- taskkill /im qbclient.exe /T /F
- taskkill /im CrossProxy.exe /T /F
- taskkill /im tgp_browser.exe /T /F
- taskkill /im TPHelper.exe /T /F
- taskkill /im GameLoader.exe /T /F
- taskkill /im tcls_core.exe /T /F
- taskkill /im DNF.exe /T /F
复制代码
最后几行自己改 |
|