XXXXX
C/C++
XXXXX
C#/.net
XXXXX
js
java
java
开发导航 开发导航 www.endv.cn
天云

绿化和卸载 DOS 批处理

 

 

  1 @ECHO OFF&PUSHD %~DP0 &TITLE 绿化和选项
  2 mode con cols=36 lines=20
  3 color 2F
  4 Rd "%WinDir%\system32\test_permissions" >NUL 2>NUL
  5 Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行!&&PAUSE >NUL&&EXIT)
  6 Rd "%WinDir%\System32\test_permissions" 2>NUL
  7 SetLocal EnableDelayedExpansion
  8 :Menu
  9 Cls
 10 @ echo.
 11 @ echo.      菜 单 选 项
 12 @ echo.
 13 @ echo.     绿化[必须] → 请输入1
 14 @ echo.
 15 @ echo.     设为默认下载器 → 请输入2
 16 @ echo.
 17 @ echo.     创建桌面图标 → 请输入3
 18 @ echo.
 19 @ echo.     自定义边下边播 → 请输入4
 20 @ echo.
 21 @ echo.     卸载 → 请输入5
 22 @ echo.
 23 set /p xj= 输入数字按回车:
 24 if /i "%xj%"=="1" Goto Install
 25 if /i "%xj%"=="2" Goto Give
 26 if /i "%xj%"=="3" Goto Establish
 27 if /i "%xj%"=="4" Goto custom
 28 if /i "%xj%"=="5" Goto Uninstall
 29 @ echo.
 30 echo      选择无效,请重新输入
 31 ping -n 2 127.1>nul
 32 goto menu
 33 :Install
 34 @ echo.
 35 ECHO    正在安装中..请稍等..
 36 taskkill /f /im Thunder*>nul 2>nul
 37 Program\Thunder.exe -unassociate:td -unassociate:torrent -unassociate:downlist -unassociate:thunderskin -unassociate:thunderaddin -unassociate:all -unregprotocol:ed2k -unregprotocol:magnet -unregprotocol:thunder -unregprotocol:xlapplink
 38 rd/s/q "%tmp%\Xunlei" >nul 2>nul
 39 rd/s/q "%tmp%\Thunder" >nul 2>nul
 40 rd/s/q "%tmp%\ThunderLiveUD" >nul 2>nul
 41 rd/s/q "%tmp%\Thunder Network" >nul 2>nul
 42 rd/s/q "%AllUsersProfile%\Application Data\Thunder Network" >nul 2>nul
 43 rd/s/q "%AllUsersProfile%\Application Data\Xunlei" >nul 2>nul
 44 rd/s/q "%AllUsersProfile%\Xunlei" >nul 2>nul
 45 rd/s/q "%AllUsersProfile%\Thunder Network" >nul 2>nul
 46 rd/s/q "%AppData%\Thunder Network" >nul 2>nul
 47 rd/s/q "%CommonProgramFiles%\Thunder Network" >nul 2>nul
 48 rd/s/q "%CommonProgramFiles(x86)%\Thunder Network" >nul 2>nul
 49 rd/s/q "%UserProfile%\Local Settings\Application Data\Thunder Network" 2>nul
 50 rd/s/q "%UserProfile%\Local Settings\Application Data\Pusher" 2>nul
 51 rd/s/q "%UserProfile%\AppData\LocalLow\Thunder Network" >nul 2>nul
 52 rd/s/q "%UserProfile%\AppData\LocalLow\XueLei" >nul 2>nul
 53 rd/s/q "%UserProfile%\My Documents\Thunder"2>nul
 54 rd/s/q "%AllUsersProfile%\Application Data\Thunder Network"2>nul
 55 If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%\Thunder Network" >nul 2>nul
 56 If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%\Documents\Thunder Network" >nul 2>nul
 57 del/f/q "%AppData%\Microsoft\Windows\Libraries\迅雷下载.library-ms" 2>nul
 58 Md "%AllUsersProfile%\Application Data\Thunder Network\tp_common_info.dat"
 59 if %errorlevel%==0 Md  "%PUBLIC%\Thunder Network\tp_common_info.dat"
 60 regsvr32 /s "Program\BHO\ThunderAgent.dll" >nul 2>nul
 61 if exist "%WinDir%\SysWOW64" regsvr32 /s "Program\BHO\ThunderAgent64.dll" >nul 2>nul
 62 Md "%AllUsersProfile%\Application Data\Thunder Network\cid_store.dat"
 63 Md "%AllUsersProfile%\Application Data\Thunder Network\emule_upload_list.dat"
 64 if %errorlevel%==0 (Md "%PUBLIC%\Thunder Network\cid_store.dat"&Md "%PUBLIC%\Thunder Network\emule_upload_list.dat")
 65 reg add "HKLM\Software\Thunder Network\ThunderOem\thunder_backwnd" /v "dir" /d "%~dp0\" /f >nul 2>nul
 66 reg add "HKLM\Software\Thunder Network\ThunderOem\thunder_backwnd" /v "Path" /d "%~dp0Program\Thunder.exe" /f >nul 2>nul
 67 reg add "HKLM\Software\Thunder Network\ThunderOem\thunder_backwnd" /v "instdir" /d "%~dp0\" /f >nul 2>nul
 68 reg add "HKLM\Software\Thunder Network\ThunderOem\thunder_backwnd" /v "Version" /d "7.9.43.5054" /f >nul 2>nul
 69 reg add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /ve /d "%~dp0Program\BHO\geturl.htm" /f >nul
 70 reg add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /v "Contexts" /t REG_DWORD /d "0x00000022" /f >nul
 71 reg add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /ve /d "%~dp0Program\BHO\getAllurl.htm" /f >nul
 72 reg add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /v "Contexts" /t REG_DWORD /d "0x000000f3" /f >nul
 73 if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v "dir" /d "%~dp0\" /f >nul 2>nul
 74 if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v "Path" /d "%~dp0Program\Thunder.exe" /f >nul 2>nul
 75 if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v "instdir" /d "%~dp0\" /f >nul 2>nul
 76 if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v "Version" /d "7.9.43.5054" /f >nul 2>nul
 77 reg add "HKCR\Xunlei.Bittorrent.6\DefaultIcon" /ve /d "%~dp0Program\TorrentFile.ico" /F>nul
 78 reg add "HKCR\Xunlei.Bittorrent.6\Shell\Open" /ve /d "使用迅雷下载该BT文件" /F>nul
 79 reg add "HKCR\Xunlei.Bittorrent.6\Shell\Open\command" /ve /d "%~dp0Program\Thunder.exe %%1" /F>nul
 80 reg add "HKCR\Xunlei.LSTFile.6\DefaultIcon" /ve /d "%~dp0Program\XLDownloadList.ico" /F>nul
 81 reg add "HKCR\Xunlei.LSTFile.6\Shell\Open" /ve /d "使用迅雷下载该任务列表文件" /F>nul
 82 reg add "HKCR\Xunlei.LSTFile.6\Shell\Open\command" /ve /d "%~dp0Program\Thunder.exe %%1" /F>nul
 83 reg add "HKCR\Xunlei.TDFile.6\DefaultIcon" /ve /d "%~dp0Program\XLTempFile.ico" /F>nul
 84 reg add "HKCR\Xunlei.TDFile.6\Shell\Open" /ve /d "使用迅雷下载未完成文件" /F>nul
 85 reg add "HKCR\Xunlei.TDFile.6\Shell\Open\command" /ve /d "%~dp0Program\Thunder.exe %%1" /F>nul
 86 goto Install2
 87 :Establish
 88 mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\迅雷.lnk""):b.TargetPath=""%~dp0Program\Thunder.exe"":b.WorkingDirectory=""%~dp0Program"":b.Save:close")
 89 goto fanhui
 90 :Give
 91 Program\BHO\XLNonIESvr.exe -r ie -silent -setfirst
 92 Program\BHO\XLNonIESvr.exe -r 360 -silent -setfirst
 93 Program\BHO\XLNonIESvr.exe -r opera -silent -setfirst
 94 Program\BHO\XLNonIESvr.exe -r maxthon -silent -setfirst
 95 Program\BHO\XLNonIESvr.exe -r theworld -silent -setfirst
 96 Program\BHO\XLNonIESvr.exe -r firefox -silent -setfirst
 97 Program\BHO\XLNonIESvr.exe -r chrome -silent -setfirst
 98 Program\BHO\XLNonIESvr.exe -r SogouExplorer -silent -setfirst
 99 regsvr32 /s "Program\np_tdieplat.dll" >nul 2>nul
100 reg add "HKLM\Software\Google\Chrome\NativeMessagingHosts\com.xunlei.thunder" /f /ve /d "%~dp0Program\com.xunlei.thunder.json" >nul
101 if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Google\Chrome\NativeMessagingHosts\com.xunlei.thunder" /f /ve /d "%~dp0Program\com.xunlei.thunder.json" >nul
102 goto fanhui
103 :Uninstall
104 @ echo.
105 echo    正在卸载中..请稍等..
106 taskkill /f /im Thunder*>nul 2>nul
107 rd/s/q "%tmp%\Xunlei" >nul 2>nul
108 rd/s/q "%tmp%\Thunder" >nul 2>nul
109 rd/s/q "%tmp%\ThunderLiveUD" >nul 2>nul
110 rd/s/q "%tmp%\Thunder Network" >nul 2>nul
111 rd/s/q "%AllUsersProfile%\Application Data\Thunder Network" >nul 2>nul
112 rd/s/q "%AllUsersProfile%\Application Data\Xunlei" >nul 2>nul
113 rd/s/q "%AllUsersProfile%\Xunlei" >nul 2>nul
114 rd/s/q "%AllUsersProfile%\Thunder Network" >nul 2>nul
115 rd/s/q "%AppData%\Thunder Network" >nul 2>nul
116 rd/s/q "%CommonProgramFiles%\Thunder Network" >nul 2>nul
117 rd/s/q "%CommonProgramFiles(x86)%\Thunder Network" >nul 2>nul
118 rd/s/q "%UserProfile%\Local Settings\Application Data\Thunder Network" 2>nul
119 rd/s/q "%UserProfile%\Local Settings\Application Data\Pusher" 2>nul
120 rd/s/q "%UserProfile%\AppData\LocalLow\Thunder Network" >nul 2>nul
121 rd/s/q "%UserProfile%\AppData\LocalLow\XueLei" >nul 2>nul
122 rd/s/q "%UserProfile%\My Documents\Thunder"2>nul
123 rd/s/q "%AllUsersProfile%\Application Data\Thunder Network"2>nul
124 del/f/q "Program\BHO\ThunderAgent7.9.39.4994.dll"2>nul
125 del/f/q "%AppData%\Microsoft\Windows\Libraries\迅雷下载.library-ms" 2>nul
126 If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%\Thunder Network" >nul 2>nul
127 If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%\Documents\Thunder Network" >nul 2>nul
128 Program\Thunder.exe -unassociate:td -unassociate:torrent -unassociate:downlist -unassociate:thunderskin -unassociate:thunderaddin -unassociate:all -unregprotocol:ed2k -unregprotocol:magnet -unregprotocol:thunder -unregprotocol:xlapplink
129 Program\BHO\XLNonIESvr.exe -u ie -silent 
130 Program\BHO\XLNonIESvr.exe -u 360 -silent
131 Program\BHO\XLNonIESvr.exe -u opera -silent 
132 Program\BHO\XLNonIESvr.exe -u chrome -silent
133 Program\BHO\XLNonIESvr.exe -u firefox -silent
134 Program\BHO\XLNonIESvr.exe -u theworld -silent
135 Program\BHO\XLNonIESvr.exe -u SogouExplorer -silent
136 regsvr32 /s /u "Program\BHO\ThunderAgent.dll" >nul 2>nul
137 if exist "%WinDir%\SysWOW64" regsvr32 /s /u "Program\BHO\ThunderAgent64.dll" >nul 2>nul
138 regsvr32 /s /u "Program\np_tdieplat.dll" >nul 2>nul
139 reg delete "HKLM\Software\Thunder Network" /f >nul 2>nul
140 reg delete "HKLM\Software\Wow6432Node\Thunder Network" /f >nul 2>nul
141 reg delete "HKLM\Software\Google\Chrome\NativeMessagingHosts" /f >nul 2>nul
142 reg delete "HKLM\Software\Wow6432Node\Google\Chrome\NativeMessagingHosts" /f >nul 2>nul
143 reg delete "HKCR\Xunlei.Bittorrent.6" /f >nul 2>nul
144 reg delete "HKCR\Xunlei.LSTFile.6" /f >nul 2>nul
145 reg delete "HKCR\Xunlei.TDFile.6" /f >nul 2>nul
146 reg delete "HKCR\Xunlei.ThunderSkin.6" /f >nul 2>nul
147 reg delete "HKCU\Software\Thunder Network" /f >nul 2>nul
148 reg delete "HKLM\Software\Google\Chrome\NativeMessagingHosts" /f >nul 2>nul
149 reg delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /f >nul 2>nul
150 reg delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /f >nul 2>nul
151 del /f /q "%userprofile%"\Desktop\迅雷.lnk
152 del /f /q "%userprofile%"\桌面\迅雷.lnk
153 goto Uninstall2
154 :custom
155 start Program\Xmp.ini
156 :fanhui
157 @ ECHO.
158 ECHO    设置完成..
159 goto menu
160 :Install2
161 @ ECHO.
162 ECHO    安装完成..
163 goto menu
164 :Uninstall2
165 @ ECHO.
166 ECHO    卸载完成..
167 goto menu

 

posted @ 2017-05-20 02:37  Endv  阅读(1207)  评论(0)    收藏  举报