绿化和卸载 DOS 批处理

  1 @ECHO OFF&PUSHD %~DP0 &TITLE 绿化和选项
  2 mode con cols=36 lines=20
  3 color 2F
  4 Rd "%WinDir%system32	est_permissions" >NUL 2>NUL
  5 Md "%WinDir%System32	est_permissions" 2>NUL||(Echo 请使用右键管理员身份运行!&&PAUSE >NUL&&EXIT)
  6 Rd "%WinDir%System32	est_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 ProgramThunder.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 DataThunder Network" >nul 2>nul
 43 rd/s/q "%AllUsersProfile%Application DataXunlei" >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 SettingsApplication DataThunder Network" 2>nul
 50 rd/s/q "%UserProfile%Local SettingsApplication DataPusher" 2>nul
 51 rd/s/q "%UserProfile%AppDataLocalLowThunder Network" >nul 2>nul
 52 rd/s/q "%UserProfile%AppDataLocalLowXueLei" >nul 2>nul
 53 rd/s/q "%UserProfile%My DocumentsThunder"2>nul
 54 rd/s/q "%AllUsersProfile%Application DataThunder Network"2>nul
 55 If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%Thunder Network" >nul 2>nul
 56 If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%DocumentsThunder Network" >nul 2>nul
 57 del/f/q "%AppData%MicrosoftWindowsLibraries迅雷下载.library-ms" 2>nul
 58 Md "%AllUsersProfile%Application DataThunder Network	p_common_info.dat"
 59 if %errorlevel%==0 Md  "%PUBLIC%Thunder Network	p_common_info.dat"
 60 regsvr32 /s "ProgramBHOThunderAgent.dll" >nul 2>nul
 61 if exist "%WinDir%SysWOW64" regsvr32 /s "ProgramBHOThunderAgent64.dll" >nul 2>nul
 62 Md "%AllUsersProfile%Application DataThunder Networkcid_store.dat"
 63 Md "%AllUsersProfile%Application DataThunder Networkemule_upload_list.dat"
 64 if %errorlevel%==0 (Md "%PUBLIC%Thunder Networkcid_store.dat"&Md "%PUBLIC%Thunder Networkemule_upload_list.dat")
 65 reg add "HKLMSoftwareThunder NetworkThunderOem	hunder_backwnd" /v "dir" /d "%~dp0" /f >nul 2>nul
 66 reg add "HKLMSoftwareThunder NetworkThunderOem	hunder_backwnd" /v "Path" /d "%~dp0ProgramThunder.exe" /f >nul 2>nul
 67 reg add "HKLMSoftwareThunder NetworkThunderOem	hunder_backwnd" /v "instdir" /d "%~dp0" /f >nul 2>nul
 68 reg add "HKLMSoftwareThunder NetworkThunderOem	hunder_backwnd" /v "Version" /d "7.9.43.5054" /f >nul 2>nul
 69 reg add "HKCUSoftwareMicrosoftInternet ExplorerMenuExt使用迅雷下载" /ve /d "%~dp0ProgramBHOgeturl.htm" /f >nul
 70 reg add "HKCUSoftwareMicrosoftInternet ExplorerMenuExt使用迅雷下载" /v "Contexts" /t REG_DWORD /d "0x00000022" /f >nul
 71 reg add "HKCUSoftwareMicrosoftInternet ExplorerMenuExt使用迅雷下载全部链接" /ve /d "%~dp0ProgramBHOgetAllurl.htm" /f >nul
 72 reg add "HKCUSoftwareMicrosoftInternet ExplorerMenuExt使用迅雷下载全部链接" /v "Contexts" /t REG_DWORD /d "0x000000f3" /f >nul
 73 if exist "%WinDir%SysWOW64" reg add "HKLMSoftwareWow6432NodeThunder NetworkThunderOem	hunder_backwnd" /v "dir" /d "%~dp0" /f >nul 2>nul
 74 if exist "%WinDir%SysWOW64" reg add "HKLMSoftwareWow6432NodeThunder NetworkThunderOem	hunder_backwnd" /v "Path" /d "%~dp0ProgramThunder.exe" /f >nul 2>nul
 75 if exist "%WinDir%SysWOW64" reg add "HKLMSoftwareWow6432NodeThunder NetworkThunderOem	hunder_backwnd" /v "instdir" /d "%~dp0" /f >nul 2>nul
 76 if exist "%WinDir%SysWOW64" reg add "HKLMSoftwareWow6432NodeThunder NetworkThunderOem	hunder_backwnd" /v "Version" /d "7.9.43.5054" /f >nul 2>nul
 77 reg add "HKCRXunlei.Bittorrent.6DefaultIcon" /ve /d "%~dp0ProgramTorrentFile.ico" /F>nul
 78 reg add "HKCRXunlei.Bittorrent.6ShellOpen" /ve /d "使用迅雷下载该BT文件" /F>nul
 79 reg add "HKCRXunlei.Bittorrent.6ShellOpencommand" /ve /d "%~dp0ProgramThunder.exe %%1" /F>nul
 80 reg add "HKCRXunlei.LSTFile.6DefaultIcon" /ve /d "%~dp0ProgramXLDownloadList.ico" /F>nul
 81 reg add "HKCRXunlei.LSTFile.6ShellOpen" /ve /d "使用迅雷下载该任务列表文件" /F>nul
 82 reg add "HKCRXunlei.LSTFile.6ShellOpencommand" /ve /d "%~dp0ProgramThunder.exe %%1" /F>nul
 83 reg add "HKCRXunlei.TDFile.6DefaultIcon" /ve /d "%~dp0ProgramXLTempFile.ico" /F>nul
 84 reg add "HKCRXunlei.TDFile.6ShellOpen" /ve /d "使用迅雷下载未完成文件" /F>nul
 85 reg add "HKCRXunlei.TDFile.6ShellOpencommand" /ve /d "%~dp0ProgramThunder.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=""%~dp0ProgramThunder.exe"":b.WorkingDirectory=""%~dp0Program"":b.Save:close")
 89 goto fanhui
 90 :Give
 91 ProgramBHOXLNonIESvr.exe -r ie -silent -setfirst
 92 ProgramBHOXLNonIESvr.exe -r 360 -silent -setfirst
 93 ProgramBHOXLNonIESvr.exe -r opera -silent -setfirst
 94 ProgramBHOXLNonIESvr.exe -r maxthon -silent -setfirst
 95 ProgramBHOXLNonIESvr.exe -r theworld -silent -setfirst
 96 ProgramBHOXLNonIESvr.exe -r firefox -silent -setfirst
 97 ProgramBHOXLNonIESvr.exe -r chrome -silent -setfirst
 98 ProgramBHOXLNonIESvr.exe -r SogouExplorer -silent -setfirst
 99 regsvr32 /s "Program
p_tdieplat.dll" >nul 2>nul
100 reg add "HKLMSoftwareGoogleChromeNativeMessagingHostscom.xunlei.thunder" /f /ve /d "%~dp0Programcom.xunlei.thunder.json" >nul
101 if exist "%WinDir%SysWOW64" reg add "HKLMSoftwareGoogleChromeNativeMessagingHostscom.xunlei.thunder" /f /ve /d "%~dp0Programcom.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 DataThunder Network" >nul 2>nul
112 rd/s/q "%AllUsersProfile%Application DataXunlei" >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 SettingsApplication DataThunder Network" 2>nul
119 rd/s/q "%UserProfile%Local SettingsApplication DataPusher" 2>nul
120 rd/s/q "%UserProfile%AppDataLocalLowThunder Network" >nul 2>nul
121 rd/s/q "%UserProfile%AppDataLocalLowXueLei" >nul 2>nul
122 rd/s/q "%UserProfile%My DocumentsThunder"2>nul
123 rd/s/q "%AllUsersProfile%Application DataThunder Network"2>nul
124 del/f/q "ProgramBHOThunderAgent7.9.39.4994.dll"2>nul
125 del/f/q "%AppData%MicrosoftWindowsLibraries迅雷下载.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%DocumentsThunder Network" >nul 2>nul
128 ProgramThunder.exe -unassociate:td -unassociate:torrent -unassociate:downlist -unassociate:thunderskin -unassociate:thunderaddin -unassociate:all -unregprotocol:ed2k -unregprotocol:magnet -unregprotocol:thunder -unregprotocol:xlapplink
129 ProgramBHOXLNonIESvr.exe -u ie -silent 
130 ProgramBHOXLNonIESvr.exe -u 360 -silent
131 ProgramBHOXLNonIESvr.exe -u opera -silent 
132 ProgramBHOXLNonIESvr.exe -u chrome -silent
133 ProgramBHOXLNonIESvr.exe -u firefox -silent
134 ProgramBHOXLNonIESvr.exe -u theworld -silent
135 ProgramBHOXLNonIESvr.exe -u SogouExplorer -silent
136 regsvr32 /s /u "ProgramBHOThunderAgent.dll" >nul 2>nul
137 if exist "%WinDir%SysWOW64" regsvr32 /s /u "ProgramBHOThunderAgent64.dll" >nul 2>nul
138 regsvr32 /s /u "Program
p_tdieplat.dll" >nul 2>nul
139 reg delete "HKLMSoftwareThunder Network" /f >nul 2>nul
140 reg delete "HKLMSoftwareWow6432NodeThunder Network" /f >nul 2>nul
141 reg delete "HKLMSoftwareGoogleChromeNativeMessagingHosts" /f >nul 2>nul
142 reg delete "HKLMSoftwareWow6432NodeGoogleChromeNativeMessagingHosts" /f >nul 2>nul
143 reg delete "HKCRXunlei.Bittorrent.6" /f >nul 2>nul
144 reg delete "HKCRXunlei.LSTFile.6" /f >nul 2>nul
145 reg delete "HKCRXunlei.TDFile.6" /f >nul 2>nul
146 reg delete "HKCRXunlei.ThunderSkin.6" /f >nul 2>nul
147 reg delete "HKCUSoftwareThunder Network" /f >nul 2>nul
148 reg delete "HKLMSoftwareGoogleChromeNativeMessagingHosts" /f >nul 2>nul
149 reg delete "HKCUSoftwareMicrosoftInternet ExplorerMenuExt使用迅雷下载" /f >nul 2>nul
150 reg delete "HKCUSoftwareMicrosoftInternet ExplorerMenuExt使用迅雷下载全部链接" /f >nul 2>nul
151 del /f /q "%userprofile%"Desktop迅雷.lnk
152 del /f /q "%userprofile%"桌面迅雷.lnk
153 goto Uninstall2
154 :custom
155 start ProgramXmp.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
原文地址:https://www.cnblogs.com/endv/p/6880899.html