@Echo Off&Title 绿化卸载
Pushd %~dp0
If "%PROCESSOR_ARCHITECTURE%"=="AMD64" (Set a="HKLM\SOFTWARE\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v&Set b=%SystemRoot%\SysWOW64) Else (Set a="HKLM\SOFTWARE\Thunder Network\ThunderOem\thunder_backwnd" /v&Set b=%SystemRoot%\system32)
:Menu
Cls
If Exist "%b%\Tasklist.exe" Tasklist|Find /i "thunder.exe">nul&&(Echo 请先退出迅雷，按任意键重试&&Pause >nul&&Goto Menu)
If Not "%1"=="" (Set c=%1&Goto Goto)
Echo.
Echo 1.绿化
Echo.
Echo 2.卸载
Echo.
Echo 3.并联IE右键下载 ( 自选 )
Echo.
Echo +.创建桌面迅雷7
Echo.
:Menu
Set /p Memories=请输入：
If "%Memories%"=="1" Goto In
If "%Memories%"=="2" Goto Un
If "%Memories%"=="3" Goto RI
if "%Memories%"=="+" Goto DesktopLnk
Echo.&Echo 输入无效，请重新输入！
pause >nul
Goto Menu
:In
BHO\XLNonIESvr.exe -u ie -silent 
BHO\XLNonIESvr.exe -u opera -silent 
BHO\XLNonIESvr.exe -u chrome -silent
BHO\XLNonIESvr.exe -u firefox -silent
BHO\XLNonIESvr.exe -u theworld -silent
BHO\XLNonIESvr.exe -u SogouExplorer -silent
Regsvr32 /s /u BHO\ThunderAgent.dll
Regsvr32 /s /u BHO\Platform\np_tdieplat.dll
Program\Thunder.exe -unassociate:td -unassociate:torrent -unassociate:downlist -unassociate:thunderskin -unassociate:thunderaddin -unassociate:all -unregprotocol:ed2k -unregprotocol:magnet -unregprotocol:thunder -unregprotocol:xlapplink
Reg Delete "HKCR\Software\thunder" /f >nul 2>nul
Reg Delete "HKLM\Software\Thunder Network" /f >nul 2>nul
Reg Delete "HKCU\Software\Thunder Network" /f >nul 2>nul
Reg Delete "HKLM\Software\Wow6432Node\Thunder Network" /f >nul 2>nul
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /f >nul 2>nul
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /f >nul 2>nul
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷离线下载" /f >nul 2>nul
Rd /s /q "%TMP%\Xunlei" >nul 2>nul
Rd /s /q "%TMP%\Thunder" >nul 2>nul
Rd /s /q "%TMP%\ThunderLiveUD" >nul 2>nul
Rd /s /q "%TMP%\Thunder Network" >nul 2>nul
If Exist "%PUBLIC%" Rd /s /q "%PUBLIC%\Thunder Network" >nul 2>nul
If Exist "%PUBLIC%" Rd /s /q "%PUBLIC%\Documents\Thunder Network" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Application Data\Thunder Network" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Application Data\Xunlei" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Xunlei" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Thunder Network" >nul 2>nul
Rd /s /q "%AppData%\Thunder Network" >nul 2>nul
Rd /s /q "%CommonProgramFiles%\Thunder Network" >nul 2>nul
Rd /s /q "%CommonProgramFiles(x86)%\Thunder Network" >nul 2>nul
Rd /s /q "%UserProfile%\Local Settings\Application Data\Thunder Network" 2>NUL
Rd /s /q "%UserProfile%\Local Settings\Application Data\Pusher" 2>NUL
Rd /s /q "%UserProfile%\AppData\LocalLow\Thunder Network" >nul 2>nul
Rd /s /q "%UserProfile%\AppData\LocalLow\XueLei" >nul 2>nul
Rd /s /q "%UserProfile%\My Documents\Thunder"2>NUL
rd /s/q "%AllUsersProfile%\Application Data\Thunder Network"2>NUL
BHO\XLNonIESvr.exe -r ie -silent -setfirst
BHO\XLNonIESvr.exe -r 360 -silent -setfirst
BHO\XLNonIESvr.exe -r opera -silent -setfirst
BHO\XLNonIESvr.exe -r maxthon -silent -setfirst
BHO\XLNonIESvr.exe -r theworld -silent -setfirst
BHO\XLNonIESvr.exe -r firefox -silent -setfirst
BHO\XLNonIESvr.exe -r chrome -silent -setfirst
BHO\XLNonIESvr.exe -r SogouExplorer -silent -setfirst
Regsvr32 /s BHO\ThunderAgent.dll >nul 2>nul
Regsvr32 /s BHO\Platform\np_tdieplat.dll >nul 2>nul
Reg Add %a% "Path" /d "%~dp0Program\Thunder.exe" /f >nul 2>nul
Reg Add %a% "dir" /d "%~dp0\" /f >nul 2>nul
Reg Add %a% "instdir" /d "%~dp0\" /f >nul 2>nul
Reg Add %a% "Version" /d "7.9.18.4724" /f >nul 2>nul
Md "%AllUsersProfile%\Application Data\Thunder Network\cid_store.dat"
Md "%AllUsersProfile%\Application Data\Thunder Network\emule_upload_list.dat"
Md "%AllUsersProfile%\Application Data\Thunder Network\DownloadLib\pub_store.dat"
Program\Thunder.exe -install -associate:all   >nul 2>nul
Del /f /q "%AppData%\Microsoft\Windows\Libraries\迅雷下载.library-ms" 2>nul
SET E=绿化完成!&GOTO MSGBOX
:RI
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /ve /d "%~dp0BHO\geturl.htm" /f >nul 2>nul
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /v "Contexts" /t REG_DWORD /d "0x00000022" >nul 2>nul
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷离线下载" /ve /d "%~dp0BHO\OfflineDownload.htm" /f >nul 2>nul
Reg Add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷离线下载" /v "Contexts" /t REG_DWORD /d "0x00000022" /f >nul 2>nul
SET E=并联完成!&GOTO MSGBOX
:Un
BHO\XLNonIESvr.exe -u ie -silent 
BHO\XLNonIESvr.exe -u opera -silent 
BHO\XLNonIESvr.exe -u chrome -silent
BHO\XLNonIESvr.exe -u firefox -silent
BHO\XLNonIESvr.exe -u theworld -silent
BHO\XLNonIESvr.exe -u SogouExplorer -silent
Regsvr32 /s /u BHO\ThunderAgent.dll
Regsvr32 /s /u BHO\Platform\np_tdieplat.dll
Regsvr32 /s /u  XunleiBHO7.9.18.4724.dll
Program\Thunder.exe -unassociate:td -unassociate:torrent -unassociate:downlist -unassociate:thunderskin -unassociate:thunderaddin -unassociate:all -unregprotocol:ed2k -unregprotocol:magnet -unregprotocol:thunder -unregprotocol:xlapplink
Reg Delete "HKCR\Software\thunder" /f >nul 2>nul
Reg Delete "HKLM\Software\Thunder Network" /f >nul 2>nul
Reg Delete "HKCU\Software\Thunder Network" /f >nul 2>nul
Reg Delete "HKCR\Xunlei.Bittorrent.6" /F >nul 2>nul
Reg Delete "HKCR\Xunlei.LSTFile.6" /F >nul 2>nul
Reg Delete "HKCR\Xunlei.TDFile.6" /F >nul 2>nul
Reg Delete "HKCR\Xunlei.ThunderSkin.6" /F >nul 2>nul
Reg Delete "HKLM\Software\Wow6432Node\Thunder Network" /f >nul 2>nul
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /f >nul 2>nul
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /f >nul 2>nul
Reg Delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷离线下载" /f >nul 2>nul
If Exist "%PUBLIC%" Rd /s /q "%PUBLIC%\Thunder Network" >nul 2>nul
If Exist "%PUBLIC%" Rd /s /q "%PUBLIC%\Documents\Thunder Network" >nul 2>nul
Rd /s /q "%TMP%\LiveUD" >nul 2>nul
Rd /s /q "%TMP%\Thunder" >nul 2>nul
Rd /s /q "%TMP%\Thunder Network" >nul 2>nul
Rd /s /q "%TMP%\ThunderLiveUD" >nul 2>nul
Rd /s /q "%TMP%\xltmp" >nul 2>nul
Rd /s /q "%TMP%\Xunlei" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Application Data\Thunder Network" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Application Data\Xunlei" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Xunlei" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Thunder Network" >nul 2>nul
Rd /s /q "%AppData%\Thunder Network" >nul 2>nul
Rd /s /q "%CommonProgramFiles%\Thunder Network" >nul 2>nul
If Exist "%CommonProgramFiles(x86)%" Rd /s /q "%CommonProgramFiles(x86)%\Thunder Network" >nul 2>nul
Rd /s /q "%UserProfile%\AppData\LocalLow\Thunder Network" >nul 2>nul
Rd /s /q "%UserProfile%\AppData\LocalLow\XunLei" >nul 2>nul
Rd /s /q "%UserProfile%\Local Settings\Application Data\Thunder Network" 2>NUL
Rd /s /q "%UserProfile%\Local Settings\Application Data\Pusher" 2>NUL
Rd /q "%SystemDrive%\TDDOWNLOAD" >nul 2>nul
Del /f /q Data\stat.xml >nul 2>nul
Rd /s /q Data\SenceTipAddin >nul 2>nul
Del /f /q Data\skin\status.xml >nul 2>nul
Del /f /q Data\skin\*.thunderskin >nul 2>nul
Rd /s /q Data\skin\autoskin >nul 2>nul
Rd /s /q "Data\ThunderPush" >nul 2>nul&del/a/f/q "Data\ThunderPush" >NUL 2>NUL
Rd /s /q "Data\skin\Online" >nul 2>nul&del/a/f/q "Data\skin\Online" >NUL 2>NUL
Rd /s /q Program\SpeedHistory >nul 2>nul
Del /f /q Program\LiveUpdate_storage.xml  >nul 2>nul
Del /f /q "BHO\*.?.?.*.dll" >nul 2>nul
SET E=卸载完成!&GOTO MSGBOX
:DesktopLnk
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\迅雷7.lnk""):b.TargetPath=""%~dp0Program\Thunder.exe"":b.WorkingDirectory=""%~dp0Program\"":b.Save:close")&SET E=创建完成!&GOTO MSGBOX
:MsgBox
if "%1"=="" mshta VBScript:MsgBox("%e%",vbSystemModal,"")(close)& Cls&Goto Menu
