mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 03:58:22 +08:00
Fix: fixed parentheses mark breaking alas.bat git check
Opt: Bluestacks realtime connect now will detect current instance automatically
This commit is contained in:
46
command/taskkill.bat
Normal file
46
command/taskkill.bat
Normal file
@@ -0,0 +1,46 @@
|
||||
@echo off
|
||||
cls
|
||||
echo.
|
||||
echo ====================================================================================================
|
||||
echo Killing LDplayer processes
|
||||
echo ====================================================================================================
|
||||
|
||||
: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 Invoking UAC for Privilege Escalation
|
||||
echo ====================================================================================================
|
||||
echo ...
|
||||
echo You can close that window now
|
||||
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)
|
||||
endlocal
|
||||
|
||||
taskkill -f -im LdVBoxHeadless.exe
|
||||
taskkill -f -im LdVBoxSVC.exe
|
||||
exit /B
|
||||
Reference in New Issue
Block a user