@ECHO OFF & PUSHD %~DP0 & TITLE 绿化
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行&&Pause >NUL&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
SetLocal EnableDelayedExpansion
taskkill /f /im DTLite* >NUL 2>NUL
taskkill /f /im DiscSo* >NUL 2>NUL
DiscSoftBusService.exe /service
reg add "HKLM\SOFTWARE\Disc Soft\DAEMON Tools Lite" /v Path /d "%~dp0\" /F>NUL
::默认设置简体中文
reg add "HKCU\Software\Disc Soft\DAEMON Tools Lite\View" /v Language /t REG_DWORD /d 2052 /F>NUL
::默认设置不自动载入
reg add "HKCU\Software\Disc Soft\DAEMON Tools Lite\Config" /v Automount /t REG_DWORD /d 0 /F>NUL
::默认取消开机自启动
reg add "HKCU\Software\Disc Soft\DAEMON Tools Lite\Config" /v Autostart /t REG_DWORD /d 0 /F>NUL
::默认不最小化到托盘
reg add "HKCU\Software\Disc Soft\DAEMON Tools Lite\Config" /v UseTrayAgent /t REG_DWORD /d 0 /F>NUL
::默认不检测自动更新
reg add "HKCU\Software\Disc Soft\DAEMON Tools Lite\Config" /v CheckForUpdate /t REG_DWORD /d 0 /F>NUL
::自动设置为免费许可
if exist "%Public%" md "%ProgramData%\DAEMON Tools Lite" 2>NUL
if not exist "%Public%" md "%AllUsersProfile%\Application Data\DAEMON Tools Lite" 2>NUL
if exist "%Public%" copy /y "license.dat" "%ProgramData%\DAEMON Tools Lite" >NUL 2>NUL
if not exist "%Public%" copy /y "license.dat" "%AllUsersProfile%\Application Data\DAEMON Tools Lite" >NUL 2>NUL
ECHO.&ECHO.完成! 是否创建桌面快捷方式？
ECHO.&ECHO.是请按任意键，否就直接关闭！&PAUSE >NUL 2>NUL
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\DAEMON Tools Lite.lnk""):b.TargetPath=""%~dp0DTLite.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")&ECHO.&ECHO.完成! &PAUSE >NUL 2>NUL