@ECHO OFF & CD /D %~DP0 & TITLE 易破解网站绿化
>NUL 2>&1 REG.exe query "HKU\S-1-5-19" || (
    ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%\Getadmin.vbs"
    ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%\Getadmin.vbs"
    "%TEMP%\Getadmin.vbs"
    DEL /f /q "%TEMP%\Getadmin.vbs" 2>NUL
    Exit /b
)

taskkill /f /im CBox* >NUL 2>NUL

rd/s/q "%temp%\CBox"2>NUL
reg delete HKCU\Software\CBox /F>NUL 2>NUL
reg delete HKCU\Software\CNTV /F>NUL 2>NUL
if exist "%Public%" rd/s/q "%ProgramData%\CBox" 2>NUL
rd/s/q "%AllUsersProfile%\Application Data\CBox" 2>NUL
if exist "%Public%" rd/s/q "%ProgramData%\CBoxService"2>NUL
rd/s/q "%AppData%\CNTV"2>NUL & rd/s/q "%AppData%\CBox"2>NUL
reg add "HKCU\Software\CBox Workshop"  /f /ve /d "%~dp0\" >NUL
reg delete HKLM\SYSTEM\CurrentControlSet\services\CntvCBoxService /f>NUL 2>NUL
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_CNTVCBOXSERVICE /f>NUL 2>NUL
reg delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "CBoxService" >NUL 2>NUL
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /f /v "CBoxService" >NUL 2>NUL
reg delete "HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run" /f /v "CBoxService" >NUL 2>NUL

echo set WshShell = WScript.CreateObject("WScript.Shell")>tmp.vbs
echo set oShellLink = WshShell.CreateShortcut("%~dp0" ^& "\CBox.lnk")>>tmp.vbs
echo oShellLink.TargetPath ="%~dp0App\CBox.exe">>tmp.vbs
echo oShellLink.WindowStyle ="1">>tmp.vbs
echo oShellLink.IconLocation = "%~dp0App\CBox.exe">>tmp.vbs
echo oShellLink.Description = "">>tmp.vbs
echo oShellLink.WorkingDirectory = "%~dp0">>tmp.vbs
echo oShellLink.Save>>tmp.vbs
call tmp.vbs & del /f /q tmp.vbs >NUL 2>NUL

ECHO.&ECHO 易破解网站绿化完成！创建快捷方式？
ECHO.&ECHO 是按任意键，否直接关闭！&PAUSE >NUL 2>NUL & CLS

mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\央视影音.lnk""):b.TargetPath=""%~dp0App\CBox.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")

ECHO.&ECHO 易破解网站创建完成！按任意键退出！&PAUSE >NUL 2>NUL & EXIT