@ECHO OFF&PUSHD %~DP0 & TITLE 绿化
taskkill /f /im BaiduP*>NUL 2>NUL
taskkill /f /im bdbtray*>NUL 2>NUL
taskkill /f /im downloader*>NUL 2>NUL
:: 注册解码相关文件
regsvr32 /s Codecs\ts.dll
regsvr32 /s Codecs\ogm.dll
regsvr32 /s Codecs\avi.dll
regsvr32 /s Codecs\mkx.dll
:: 注册网页播放控件
regsvr32 /s Xbdyy.dll npxbdyyreg.dll
:: 清理临时后台数据
rd/s/q "%AppData%\Baidu\BaiduPlayer"2>NUL
rd/s/q "%AppData%\Baidu\BaiduPlayer2\bdbtray"2>NUL
rd/s/q "%UserProFile%\AppData\LocalLow\Baidu\BaiduPlayer"2>NUL
rd/s/q "%AllUsersProfile%\Application Data\Baidu\BaiduPlayer"2>NUL
if exist "%PUBLIC%" md "%UserProFile%\AppData\LocalLow\Baidu\BaiduPlayer"2>NUL
::放置占位文件屏蔽热门影视
if not exist "%PUBLIC%" md "%AppData%\Baidu\BaiduPlayer"2>NUL
if not exist "%PUBLIC%" md "%AllUsersProfile%\Application Data\Baidu\BaiduPlayer"2>NUL
if exist "%PUBLIC%" echo.> "%UserProFile%\AppData\LocalLow\Baidu\BaiduPlayer\Favourites"2>NUL
if not exist "%PUBLIC%" echo.>"%AppData%\Baidu\BaiduPlayer\Favourites"2>NUL
if not exist "%PUBLIC%" echo.>"%AllUsersProfile%\Application Data\Baidu\BaiduPlayer\Favourites"2>NUL
:Menu
echo.&echo +.创建桌面百度影音 
echo.&echo 1.显示首屏热门影视推荐[自选]
echo.&echo 2.屏蔽首屏热门影视推荐[默认]
echo.&echo.
set /p a=输入数字回车：
if "%a%"=="+" Goto DesktopLnk
if "%a%"=="1" Goto ShowHot
if "%a%"=="2" Goto HideHot
:ShowHot
del/f "%AppData%\Baidu\BaiduPlayer\Favourites">NUL 2>NUL
del/f "%UserProFile%\AppData\LocalLow\Baidu\BaiduPlayer\Favourites">NUL 2>NUL
SET E=完成!&GOTO MSGBOX
:HideHot
rd/s/q "%AppData%\Baidu\BaiduPlayer\Favourites"2>NUL
if exist "%PUBLIC%" md "%AppData%\Baidu\BaiduPlayer"2>NUL
rd/s/q "%UserProFile%\AppData\LocalLow\Baidu\BaiduPlayer\Favourites"2>NUL
if exist "%PUBLIC%" echo.>"%AppData%\Baidu\BaiduPlayer\Favourites" 2>NUL
if not exist "%PUBLIC%" md "%UserProFile%\AppData\LocalLow\Baidu\BaiduPlayer"2>NUL
if not exist "%PUBLIC%" echo.>"%UserProFile%\AppData\LocalLow\Baidu\BaiduPlayer\Favourites" 2>NUL
SET E=完成!&GOTO MSGBOX
:DesktopLnk
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\百度影音.lnk""):b.TargetPath=""%~dp0BaiduPlayer.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")&SET E=完成!&GOTO MSGBOX
:MsgBox
if "%1"=="" mshta VBScript:MsgBox("%e%",vbSystemModal,"")(close)&CLS&GOTO MENU