BAT自动复制最新插件至运行程序
@echo off & PUSHD %~dp0 & TITLE ... TITLE Formating ... mode con lines=1 cols=64 color 0A TITLE Variable ... set BAT_UAC_DIR=%TMP% set BAT_UAC_NAME=%random%.vbs set BAT_UAC_FILE=%BAT_UAC_DIR%\%BAT_UAC_NAME% TITLE Vbs ... 1>NUL 2>&1 reg query "HKU\S-1-5-19" || ( echo set obj = CreateObject^("Shell.Application"^) >> "%BAT_UAC_FILE%" echo obj.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%BAT_UAC_FILE%" "%BAT_UAC_FILE%" del /A /F /Q "%BAT_UAC_DIR%\*.vbs" 2>NUL exit /B ) :LRetry TITLE Copying ... copy /Y "F:\workspace\*.dll" "C:\plugins\" rem if %ERRORLEVEL% EQU 0 ( goto LDone ) ^ else ( TITLE Retrying ... TIMEOUT /T 1 /NOBREAK TASKKILL /F /IM X.exe TASKKILL /F /IM XS.exe goto LRetry ) :LDone TITLE Running ... "C:\X.exe" & EXIT rem pause