@ECHO OFF&PUSHD %~DP0 &TITLE 绿化和选项
mode con cols= lines=
color 2F
Rd "%WinDir%\system32\test_permissions" >NUL >NUL
Md "%WinDir%\System32\test_permissions" >NUL||(Echo 请使用右键管理员身份运行!&&PAUSE >NUL&&EXIT)
Rd "%WinDir%\System32\test_permissions" >NUL
SetLocal EnableDelayedExpansion
:Menu
Cls
@ echo.
@ echo.      菜 单 选 项
@ echo.
@ echo. 绿化[必须] → 请输入1
@ echo.
@ echo. 设为默认下载器 → 请输入2
@ echo.
@ echo. 创建桌面图标 → 请输入3
@ echo.
@ echo. 自定义边下边播 → 请输入4
@ echo.
@ echo. 卸载 → 请输入5
@ echo.
set /p xj= 输入数字按回车:
if /i "%xj%"=="" Goto Install
if /i "%xj%"=="" Goto Give
if /i "%xj%"=="" Goto Establish
if /i "%xj%"=="" Goto custom
if /i "%xj%"=="" Goto Uninstall
@ echo.
echo 选择无效,请重新输入
ping -n 127.1>nul
goto menu
:Install
@ echo.
ECHO    正在安装中..请稍等..
taskkill /f /im Thunder*>nul >nul
Program\Thunder.exe -unassociate:td -unassociate:torrent -unassociate:downlist -unassociate:thunderskin -unassociate:thunderaddin -unassociate:all -unregprotocol:ed2k -unregprotocol:magnet -unregprotocol:thunder -unregprotocol:xlapplink
rd/s/q "%tmp%\Xunlei" >nul >nul
rd/s/q "%tmp%\Thunder" >nul >nul
rd/s/q "%tmp%\ThunderLiveUD" >nul >nul
rd/s/q "%tmp%\Thunder Network" >nul >nul
rd/s/q "%AllUsersProfile%\Application Data\Thunder Network" >nul >nul
rd/s/q "%AllUsersProfile%\Application Data\Xunlei" >nul >nul
rd/s/q "%AllUsersProfile%\Xunlei" >nul >nul
rd/s/q "%AllUsersProfile%\Thunder Network" >nul >nul
rd/s/q "%AppData%\Thunder Network" >nul >nul
rd/s/q "%CommonProgramFiles%\Thunder Network" >nul >nul
rd/s/q "%CommonProgramFiles(x86)%\Thunder Network" >nul >nul
rd/s/q "%UserProfile%\Local Settings\Application Data\Thunder Network" >nul
rd/s/q "%UserProfile%\Local Settings\Application Data\Pusher" >nul
rd/s/q "%UserProfile%\AppData\LocalLow\Thunder Network" >nul >nul
rd/s/q "%UserProfile%\AppData\LocalLow\XueLei" >nul >nul
rd/s/q "%UserProfile%\My Documents\Thunder">nul
rd/s/q "%AllUsersProfile%\Application Data\Thunder Network">nul
If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%\Thunder Network" >nul >nul
If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%\Documents\Thunder Network" >nul >nul
del/f/q "%AppData%\Microsoft\Windows\Libraries\迅雷下载.library-ms" >nul
Md "%AllUsersProfile%\Application Data\Thunder Network\tp_common_info.dat"
if %errorlevel%== Md "%PUBLIC%\Thunder Network\tp_common_info.dat"
regsvr32 /s "Program\BHO\ThunderAgent.dll" >nul >nul
if exist "%WinDir%\SysWOW64" regsvr32 /s "Program\BHO\ThunderAgent64.dll" >nul >nul
Md "%AllUsersProfile%\Application Data\Thunder Network\cid_store.dat"
Md "%AllUsersProfile%\Application Data\Thunder Network\emule_upload_list.dat"
if %errorlevel%== (Md "%PUBLIC%\Thunder Network\cid_store.dat"&Md "%PUBLIC%\Thunder Network\emule_upload_list.dat")
reg add "HKLM\Software\Thunder Network\ThunderOem\thunder_backwnd" /v "dir" /d "%~dp0\" /f >nul 2>nul
reg add "HKLM\Software\Thunder Network\ThunderOem\thunder_backwnd" /v "Path" /d "%~dp0Program\Thunder.exe" /f >nul >nul
reg add "HKLM\Software\Thunder Network\ThunderOem\thunder_backwnd" /v "instdir" /d "%~dp0\" /f >nul 2>nul
reg add "HKLM\Software\Thunder Network\ThunderOem\thunder_backwnd" /v "Version" /d "7.9.43.5054" /f >nul >nul
reg add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /ve /d "%~dp0Program\BHO\geturl.htm" /f >nul
reg add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /v "Contexts" /t REG_DWORD /d "0x00000022" /f >nul
reg add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /ve /d "%~dp0Program\BHO\getAllurl.htm" /f >nul
reg add "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /v "Contexts" /t REG_DWORD /d "0x000000f3" /f >nul
if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v "dir" /d "%~dp0\" /f >nul 2>nul
if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v "Path" /d "%~dp0Program\Thunder.exe" /f >nul >nul
if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v "instdir" /d "%~dp0\" /f >nul 2>nul
if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd" /v "Version" /d "7.9.43.5054" /f >nul >nul
reg add "HKCR\Xunlei.Bittorrent.6\DefaultIcon" /ve /d "%~dp0Program\TorrentFile.ico" /F>nul
reg add "HKCR\Xunlei.Bittorrent.6\Shell\Open" /ve /d "使用迅雷下载该BT文件" /F>nul
reg add "HKCR\Xunlei.Bittorrent.6\Shell\Open\command" /ve /d "%~dp0Program\Thunder.exe %%1" /F>nul
reg add "HKCR\Xunlei.LSTFile.6\DefaultIcon" /ve /d "%~dp0Program\XLDownloadList.ico" /F>nul
reg add "HKCR\Xunlei.LSTFile.6\Shell\Open" /ve /d "使用迅雷下载该任务列表文件" /F>nul
reg add "HKCR\Xunlei.LSTFile.6\Shell\Open\command" /ve /d "%~dp0Program\Thunder.exe %%1" /F>nul
reg add "HKCR\Xunlei.TDFile.6\DefaultIcon" /ve /d "%~dp0Program\XLTempFile.ico" /F>nul
reg add "HKCR\Xunlei.TDFile.6\Shell\Open" /ve /d "使用迅雷下载未完成文件" /F>nul
reg add "HKCR\Xunlei.TDFile.6\Shell\Open\command" /ve /d "%~dp0Program\Thunder.exe %%1" /F>nul
goto Install2
:Establish
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")
goto fanhui
:Give
Program\BHO\XLNonIESvr.exe -r ie -silent -setfirst
Program\BHO\XLNonIESvr.exe -r -silent -setfirst
Program\BHO\XLNonIESvr.exe -r opera -silent -setfirst
Program\BHO\XLNonIESvr.exe -r maxthon -silent -setfirst
Program\BHO\XLNonIESvr.exe -r theworld -silent -setfirst
Program\BHO\XLNonIESvr.exe -r firefox -silent -setfirst
Program\BHO\XLNonIESvr.exe -r chrome -silent -setfirst
Program\BHO\XLNonIESvr.exe -r SogouExplorer -silent -setfirst
regsvr32 /s "Program\np_tdieplat.dll" >nul >nul
reg add "HKLM\Software\Google\Chrome\NativeMessagingHosts\com.xunlei.thunder" /f /ve /d "%~dp0Program\com.xunlei.thunder.json" >nul
if exist "%WinDir%\SysWOW64" reg add "HKLM\Software\Google\Chrome\NativeMessagingHosts\com.xunlei.thunder" /f /ve /d "%~dp0Program\com.xunlei.thunder.json" >nul
goto fanhui
:Uninstall
@ echo.
echo    正在卸载中..请稍等..
taskkill /f /im Thunder*>nul >nul
rd/s/q "%tmp%\Xunlei" >nul >nul
rd/s/q "%tmp%\Thunder" >nul >nul
rd/s/q "%tmp%\ThunderLiveUD" >nul >nul
rd/s/q "%tmp%\Thunder Network" >nul >nul
rd/s/q "%AllUsersProfile%\Application Data\Thunder Network" >nul >nul
rd/s/q "%AllUsersProfile%\Application Data\Xunlei" >nul >nul
rd/s/q "%AllUsersProfile%\Xunlei" >nul >nul
rd/s/q "%AllUsersProfile%\Thunder Network" >nul >nul
rd/s/q "%AppData%\Thunder Network" >nul >nul
rd/s/q "%CommonProgramFiles%\Thunder Network" >nul >nul
rd/s/q "%CommonProgramFiles(x86)%\Thunder Network" >nul >nul
rd/s/q "%UserProfile%\Local Settings\Application Data\Thunder Network" >nul
rd/s/q "%UserProfile%\Local Settings\Application Data\Pusher" >nul
rd/s/q "%UserProfile%\AppData\LocalLow\Thunder Network" >nul >nul
rd/s/q "%UserProfile%\AppData\LocalLow\XueLei" >nul >nul
rd/s/q "%UserProfile%\My Documents\Thunder">nul
rd/s/q "%AllUsersProfile%\Application Data\Thunder Network">nul
del/f/q "Program\BHO\ThunderAgent7.9.39.4994.dll">nul
del/f/q "%AppData%\Microsoft\Windows\Libraries\迅雷下载.library-ms" >nul
If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%\Thunder Network" >nul >nul
If Exist "%PUBLIC%" Rd /s/q "%PUBLIC%\Documents\Thunder Network" >nul >nul
Program\Thunder.exe -unassociate:td -unassociate:torrent -unassociate:downlist -unassociate:thunderskin -unassociate:thunderaddin -unassociate:all -unregprotocol:ed2k -unregprotocol:magnet -unregprotocol:thunder -unregprotocol:xlapplink
Program\BHO\XLNonIESvr.exe -u ie -silent
Program\BHO\XLNonIESvr.exe -u -silent
Program\BHO\XLNonIESvr.exe -u opera -silent
Program\BHO\XLNonIESvr.exe -u chrome -silent
Program\BHO\XLNonIESvr.exe -u firefox -silent
Program\BHO\XLNonIESvr.exe -u theworld -silent
Program\BHO\XLNonIESvr.exe -u SogouExplorer -silent
regsvr32 /s /u "Program\BHO\ThunderAgent.dll" >nul >nul
if exist "%WinDir%\SysWOW64" regsvr32 /s /u "Program\BHO\ThunderAgent64.dll" >nul >nul
regsvr32 /s /u "Program\np_tdieplat.dll" >nul >nul
reg delete "HKLM\Software\Thunder Network" /f >nul >nul
reg delete "HKLM\Software\Wow6432Node\Thunder Network" /f >nul >nul
reg delete "HKLM\Software\Google\Chrome\NativeMessagingHosts" /f >nul >nul
reg delete "HKLM\Software\Wow6432Node\Google\Chrome\NativeMessagingHosts" /f >nul >nul
reg delete "HKCR\Xunlei.Bittorrent.6" /f >nul >nul
reg delete "HKCR\Xunlei.LSTFile.6" /f >nul >nul
reg delete "HKCR\Xunlei.TDFile.6" /f >nul >nul
reg delete "HKCR\Xunlei.ThunderSkin.6" /f >nul >nul
reg delete "HKCU\Software\Thunder Network" /f >nul >nul
reg delete "HKLM\Software\Google\Chrome\NativeMessagingHosts" /f >nul >nul
reg delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载" /f >nul >nul
reg delete "HKCU\Software\Microsoft\Internet Explorer\MenuExt\使用迅雷下载全部链接" /f >nul >nul
del /f /q "%userprofile%"\Desktop\迅雷.lnk
del /f /q "%userprofile%"\桌面\迅雷.lnk
goto Uninstall2
:custom
start Program\Xmp.ini
:fanhui
@ ECHO.
ECHO    设置完成..
goto menu
:Install2
@ ECHO.
ECHO    安装完成..
goto menu
:Uninstall2
@ ECHO.
ECHO    卸载完成..
goto menu

绿化和卸载 DOS 批处理的更多相关文章

  1. 利用DOS批处理实现定时关机操作

    10月1放假回来,寝室晚上10:30就停电了,最无法让人理解的是第二天早上8:00才来电.原来晚上电脑都是不关机的,开着WiFi一直到天亮,可是现在不行了,电脑如果一直开着第二天早上起来电脑肯定没电, ...

  2. DOS批处理中%cd%和%~dp0的区别

    DOS批处理中%cd%和%~dp0的区别   在DOS的批处理中,有时候需要知道当前的路径. 在DOS中,有两个环境变量可以跟当前路径有关,一个是%cd%, 一个是%~dp0.       这两个变量 ...

  3. DOS批处理不支持将UNC 路径作为当前目录的巧妙解决方案

    DOS批处理不支持将UNC 路径作为当前目录的巧妙解决方案在有些时候,需要在批处理中操作UNC目录,但批处理并不能直接对UNC目录进行操作,怎么办? 废话少说,直接上代码,打开网上邻居→整个网络→Mi ...

  4. 用DOS批处理实现FTP自动上传、下载、清理文件

    用DOS批处理实现FTP自动上传.下载.清理文件 最近好像特别的忙,好久没来写点东西了,今天写了一个利用批处理程序完成FTP自动上传.下载.清理文件的程序.赶紧 记录下来,以备日后之用.功能介绍:自动 ...

  5. DOS批处理命令判断操作系统版本、执行各版本对应语句

    DOS批处理命令判断操作系统版本.执行各版本对应语句   昨天在家里试用  netsh interface ip set address 这些命令更改上网IP.DNS.网关等,今天将那些代码拿来办公室 ...

  6. DOS批处理延时技术

    DOS批处理延时技术 举个例子,我们要延时5秒打开gdh.txt这个文件,可以用以下几个方法 方法一:ping  缺点:时间精度为1秒,不够精确   www.2cto.com   @echo off  ...

  7. DOS批处理的字符串功能

    原文:DOS批处理的字符串功能 DOS批处理的字符串功能 批处理有着具有非常强大的字符串处理能力,其功能绝不低于C语言里面的字符串函数集.批处理中可实现的字符串处理功能有:截取字符串内容.替换字符串特 ...

  8. DOS批处理中%cd%和%~dp0的区别[forward]

    DOS批处理中%cd%和%~dp0的区别   在DOS的批处理中,有时候需要知道当前的路径. 在DOS中,有两个环境变量可以跟当前路径有关,一个是%cd%, 一个是%~dp0.      这两个变量的 ...

  9. DOS批处理命令递归删除给定的文件(夹),兼VC工程清理小工具

    使用dos批处理命令递归删除指定的文件(夹): (下面内容针对清理VC工程!自己按说明任意修改) 2014-06-10修改:删除前增加了[y,n]询问: echo off rem 递归删除当前文件下指 ...

随机推荐

  1. Supervisor-类unix系统下的进程控制工具

    如果你的英文足够好,请看官网的文档:http://supervisord.org/introduction.html 简介: Supervisor 类unix系统下的进程控制工具. 特性: 1.配置简 ...

  2. Django学生管理系统添加学生时,报错Not Found: /POST

    最近在学习Django,跟着视频写了一个学生系统,主要是增删改查操作,界面丑的一匹 1.url.py from django.contrib import admin from django.urls ...

  3. mysql查看表结构,字段等命令

    mysql查看表结构命令,如下: desc 表名; show columns from 表名; describe 表名; show create table 表名;

  4. pymysql - 错误备查

    1. 关于可变参数:*sqls 注意,传入 list 时需要加 *[1,2,3],否则会被拆成 [1], [2], [3], 导致数据类型错误

  5. Vue 2.0 Application Sample

    ===搭建Demo=== http://blog.csdn.net/wangjiaohome/article/details/51728217 ===单页Application=== http://b ...

  6. 单例(LintCode)

    单例 单例 是最为最常见的设计模式之一.对于任何时刻,如果某个类只存在且最多存在一个具体的实例,那么我们称这种设计模式为单例.例如,对于 class Mouse (不是动物的mouse哦),我们应将其 ...

  7. 洛谷——P1916 小书童——蚂蚁大战

    P1916 小书童——蚂蚁大战 题目背景 小A在你的帮助下,开始“刷题”,他在小书童里发现了一款叫“蚂蚁大战”(又称蛋糕保卫战)的游戏.(你懂得) 题目描述 游戏中会出现n只蚂蚁,分别有a1,a2…… ...

  8. UTF-8 与 BIG-5 转码

    BIG-5 轉 UTF-8 若要將一個文字檔從 BIG-5 編碼轉換為 UTF-8 編碼,可以執行: iconv -f BIG-5 -t UTF-8 big5.txt > utf8.txt 其中 ...

  9. luogu P1979 华容道

    solution 被假hash可了半天....sadQAQ code // luogu-judger-enable-o2 #include<queue> #include<cstdi ...

  10. Codeforces 850B

    题意: 给出一个序列,两种操作: 1.删除一个数,代价为x 2.给一个数+1,代价为y 求最小代价,使这个序列不为空,且所有的数的gcd>1 n<=5e5,a[i]<=1e6 其实思 ...