@Echo Off
Pushd %~dp0
Title QQ2011JayXon绿色精简版辅助工具
If "%PROCESSOR_ARCHITECTURE%"=="AMD64" (Set b=%SystemRoot%\SysWOW64) Else (Set b=%SystemRoot%\system32)
Md "%b%\test_permissions_JayXon" 2>nul||(Echo 请使用右键管理员身份运行&&Pause >nul&&Exit)
Rd "%b%\test_permissions_JayXon"
SetLocal EnableDelayedExpansion
:Menu
Cls
Tasklist|Find /i "qq.exe">nul&&(Echo 请先退出QQ，按任意键重试&&Pause >nul&&Goto Menu)
If Not "%1"=="" (Set c=%1&Goto Goto)
Echo 注：此QQ可以解压直接运行，以下只是一些增强功能
Echo 1.屏蔽扫描硬盘与登录时主面板下方广告(纯净版用，显IP版已屏蔽)
Echo 2.屏蔽群动态群热点广告
Echo 3.修复网络硬盘上传和微博图片上传功能
Echo 4.修复登录超时
Echo 5.创建桌面快捷方式
Echo 6.卸载
Echo 7.退出
Set /p c=请输入数字并按Enter确定：
:Goto
If Not "%c%"=="" Set c=%c:~0,1%
If "%c%"=="1" Goto Fuck
If "%c%"=="2" Goto Hosts
If "%c%"=="3" Goto Upload
If "%c%"=="4" Goto Overtime
If "%c%"=="5" Goto lnk
If "%c%"=="6" Goto Uninstall
If "%c%"=="7" Exit
Goto Menu
:Fuck
Rd /s /q "%AppData%\Tencent\QQ" >nul 2>nul
Rd /s /q "%TMP%\qqsafeud.exe" >nul 2>nul||Del /f /q "%TMP%\qqsafeud.exe" >nul 2>nul
Md "%AppData%\Tencent\QQ"&&Echo.>"%AppData%\Tencent\QQ\SafeBase"
Md "%AppData%\Tencent\QQ\Misc"&&Echo.>"%AppData%\Tencent\QQ\Misc\OAPanelLogo"
Md "%TMP%\qqsafeud.exe"
Set e=屏蔽完成
Goto MsgBox
:Overtime
Rd /s /q "%CommonProgramFiles%\Tencent" >nul 2>nul
Rd /s /q "%CommonProgramFiles(x86)%\Tencent" >nul 2>nul
:Upload
If "%c%"=="3" Regsvr32 /s Bin\TXFTNActiveX1.13.dll
Set e=修复完成
Goto MsgBox
:Hosts
Cls
Echo 屏蔽群动态群热点广告需要修改系统的Hosts文件，且卸载时不会恢复，屏蔽一次即可，但是可能不会立即生效
Set /p c=确定要进行屏蔽？[y/n]
If Not "%c%"=="" Set c=%c:~0,1%
If Not "%c%"=="y" If Not "%c%"=="Y" Goto Menu
Set h=%SystemRoot%\system32\drivers\etc\hosts
Echo 0.0.0.0 adping.qq.com>>%h%
Echo 0.0.0.0 adsclick.qq.com>>%h%
Echo 0.0.0.0 adsfile.qq.com>>%h%
Echo 0.0.0.0 adsgroup.qq.com>>%h%
Echo 0.0.0.0 adshmct.qq.com>>%h%
Echo 0.0.0.0 adslvseed.qq.com>>%h%
Echo 0.0.0.0 adsrich.qq.com>>%h%
Echo 0.0.0.0 adstextview.qq.com>>%h%
Echo 0.0.0.0 adsview.qq.com>>%h%
Echo 0.0.0.0 adsview2.qq.com>>%h%
Echo 0.0.0.0 c.gdt.qq.com>>%h%
Echo 0.0.0.0 fodder.qq.com>>%h%
Echo 0.0.0.0 fw.qq.com>>%h%
Echo 0.0.0.0 oimsgad.qq.com>>%h%
Echo 0.0.0.0 pingfore.qq.com>>%h%
Echo 0.0.0.0 scdown.qq.com>>%h%
Echo 0.0.0.0 show-msgch.qq.com>>%h%
Echo 0.0.0.0 trace.qq.com>>%h%
Echo 0.0.0.0 f.qstatic.com>>%h%
Echo 0.0.0.0 c.l.qq.com>>%h%
Echo 0.0.0.0 hm.l.qq.com>>%h%
Echo 0.0.0.0 imc.l.qq.com>>%h%
Echo 0.0.0.0 l.qq.com>>%h%
Echo 0.0.0.0 p.l.qq.com>>%h%
Echo 0.0.0.0 w.l.qq.com>>%h%
ipconfig /flushdns >nul
Set e=屏蔽完成
Goto MsgBox
:Uninstall
Regsvr32 /s /u Bin\TXFTNActiveX1.13.dll
Regsvr32 /s /u Bin\SSOCommon.dll
If Exist Bin\TXPFProxy.dll Regsvr32 /s /u Bin\TXPFProxy.dll
If Exist Bin\SSOAxCtrlForPTLogin.dll Regsvr32 /s /u Bin\SSOAxCtrlForPTLogin.dll
If Exist Bin\Timwp.dll Regsvr32 /s /u Bin\Timwp.dll
For /f "skip=2 tokens=3" %%i in ('Reg Query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Desktop') do set d=%%i\
Del /f /q "%d:\\=\%QQ2011.lnk" >nul 2>nul
Reg Delete "HKLM\SOFTWARE\Tencent" /f >nul 2>nul
Reg Delete "HKCU\SOFTWARE\Tencent" /f >nul 2>nul
Reg Delete "HKLM\SOFTWARE\Wow6432Node\Tencent" /f >nul 2>nul
Rd /s /q "%AppData%\Tencent\QQ" >nul 2>nul
Rd /s /q "%AppData%\Tencent\Logs" >nul 2>nul
Rd /s /q "%TMP%\qqsafeud.exe" >nul 2>nul||Del /f /q "%TMP%\qqsafeud.exe" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Documents\Tencent" >nul 2>nul
Rd /s /q "%AllUsersProfile%\Tencent" >nul 2>nul
Del /f /q "%TMP%\ts*.dat" >nul 2>nul
Set e=卸载完成
Goto MsgBox
:lnk
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\QQ2011.lnk""):b.TargetPath=""%~dp0Bin\QQ.exe"":b.WorkingDirectory=""%~dp0Bin\"":b.Save:close")
Set e=创建快捷方式完成
:MsgBox
mshta VBScript:Msgbox("%e%",vbSystemModal,"")(close)
Goto Menu