@ECHO OFF&PUSHD %~DP0 &TITLE 绿化卸载
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo.&Echo 请使用右键“以管理员身份运行”&&Pause >NUL&&Exit)
Rd "%WinDir%\System32\test_permissions" 2>NUL
SetLocal EnableDelayedExpansion

:Menu
echo.&echo 1.绿化
echo.&echo 2.卸载
echo.&echo +.创建桌面吉吉影音
echo.&echo 3.显示首屏娱乐风向标(影视搜索)[默认]
echo.&echo 4.屏蔽首屏娱乐风向标(影视搜索)[自选]
echo.&echo.
set /p a=输入数字回车：
IF NOT "%a%"=="" SET a=%a:~0,1%
if "%a%"=="1" Goto Setup
if "%a%"=="2" Goto Uninst
if "%a%"=="+" Goto DesktopLnk
if "%a%"=="3" Goto OpenVideoHot
if "%a%"=="4" Goto CloseVideoHot
echo.&echo 输入无效，请重新输入！ 
PAUSE >NUL & CLS & GOTO Menu

:Setup
taskkill /f /im hdacc* >NUL 2>NUL
taskkill /f /im JJPlayer* >NUL 2>NUL
WebPlayer64.exe /regserver
regsvr32 /s npWebPlayer.dll
del/q"%Appdata%\JJPlayer\*.ini" >NUL 2>NUL
del/q "%ProgramData%\JJPlayer\*.ini" >NUL 2>NUL
del/q "%ProgramData%\JJPlayer\MediaData\txt*.xml" >NUL 2>NUL
del/q "%ProgramData%\JJPlayer\MediaData\keywords*.xml" >NUL 2>NUL
del/q "%Appdata%\JJPlayer\MediaData\txt*.xml" >NUL 2>NUL
del/q "%Appdata%\JJPlayer\MediaData\keywords*.xml" >NUL 2>NUL
copy /y dxva2.dll "%WinDir%\System32" >NUL 2>NUL
if not exist "%PUBLIC%" md "%Appdata%\JJPlayer" >NUL 2>NUL
if exist "%PUBLIC%" md "%ProgramData%\JJPlayer" >NUL 2>NUL
if not exist "%PUBLIC%" copy /y MediaLink.ini "%Appdata%\JJPlayer">NUL 2>NUL
if exist "%PUBLIC%" copy /y MediaLink.ini "%ProgramData%\JJPlayer">NUL 2>NUL
ECHO.&ECHO 绿化完成，任意键返回！&PAUSE >NUL 2>NUL & CLS & GOTO MENU

:OpenVideoHot
ren "-Gallery" "Gallery" >NUL 2>NUL
ECHO.&ECHO 启用完成，任意键返回！&PAUSE >NUL 2>NUL & CLS & GOTO MENU

:CloseVideoHot
ren "Gallery" "-Gallery" >NUL 2>NUL
ECHO.&ECHO 禁用完成，任意键返回！&PAUSE >NUL 2>NUL & CLS & GOTO MENU

:Uninst
taskkill /f /im hdacc* >NUL 2>NUL
taskkill /f /im JJPlayer* >NUL 2>NUL
rd/s/q "%Appdata%\JJVOD" 2>NUL
rd/s/q "%Appdata%\JJPlayer" 2>NUL
WebPlayer64.exe /unregserver
regsvr32 /s /u npWebPlayer.dll
if exist "%PUBLIC%" rd/s/q "%ProgramData%\JJPlayer" >NUL 2>NUL
reg delete "HKCU\Software\AppDataLow\SOFTWARE\JJVod" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\MozillaPlugins\@itstructures.com/ffactivex" /f>NUL 2>NUL
reg delete "HKLM\SOFTWARE\Wow6432Node\MozillaPlugins\@itstructures.com/ffactivex" /f>NUL 2>NUL
ECHO.&ECHO 卸载完成，任意键返回！&PAUSE >NUL 2>NUL & CLS & GOTO MENU

:DesktopLnk
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\吉吉影音.lnk""):b.TargetPath=""%~dp0JJPlayer.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")
ECHO.&ECHO 创建完成，任意键返回！&PAUSE >NUL 2>NUL & CLS & GOTO MENU