::================================================================================================== ::关闭回显 @echo off ::设置标题 title 覆盖 Shadow Defender 语言文件并注册::================================================================================================== ::获取管理员权限 set "_FilePath=%~f0" set "_FileDir=%~dp0" setlocal EnableExtensions EnableDelayedExpansion fltmc >nul 2>&1 || (echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\GetAdmin.vbs"echo UAC.ShellExecute "!_FilePath!", "", "", "runas", 1 >> "%temp%\GetAdmin.vbs""%temp%\GetAdmin.vbs"del /f /q "%temp%\GetAdmin.vbs" >nul 2>&1exit ) pushd "!_FileDir!"::================================================================================================== ::运行安装程序 for /f %%i in ('dir /b *.exe') do %%i::等待安装程序结束 :wait :: 等待 5 秒 choice /t 5 /d y /n >nul :: 检测到安装程序则返回继续等待 tasklist /fi "windowtitle eq 安装 - Shadow Defender" | find /i "setup.exe" >nul && goto wait::赋root值为空 set root="" ::获取安装路径,如未获取到则退出 for /f "skip=2 tokens=2*" %%a in ('reg query "HKLM\SOFTWARE\Shadow Defender" /v Path 2^>nul') do set "root=%%b" if /i "%root%"=="" exit::如当前目录存在语言文件res.ini则复制到安装目录下并覆盖原有文件 if exist res.ini copy /y res.ini "%root%" >nul::如检测到未注册则自动进行注册 ::if exist "%root%\user.dat" ( ::type "%root%\user.dat" | find /i "sn=" >nul || echo.sn=(此处填入SN)>>"%root%\user.dat" ::)