@echo off &Pushd %~dp0&Title 绿化卸载
mode con cols=45 lines=11&color 8F
:Menu
Cls
echo.&echo.  1.绿化
echo.&echo.  2.卸载
echo.
set /p Memories=请输入：
if /i "%Memories%"=="1" Goto In
if /i "%Memories%"=="2" Goto Un
echo.&echo 输入无效，请重新输入！
pause >nul
goto menu
:In
taskkill /f /im QQ*  >NUL 2>NUL
taskkill /f /im TXP* >NUL 2>NUL
taskkill /f /im tad* >NUL 2>NUL
del/q "%tmp%\ts*.dat">NUL 2>NUL
del/f/q "%tmp%\*.tvl">NUL 2>NUL
del/f/q "%tmp%\*.tsd">NUL 2>NUL
del/q "%tmp%\QQSafe*.exe">NUL 2>NUL
rd/s/q "%AppData%\Tencent\QQ"2>NUL
rd/s/q "%AppData%\Tencent\Logs"2>NUL
rd/s/q "%AppData%\Tencent\Users"2>NUL
rd/s/q "%AppData%\Tencent\QTalk"2>NUL
rd/s/q "%APPDATA%\Tencent\QQDoctor"2>NUL
rd/s/q "%AppData%\Tencent\DeskUpdate"2>NUL
rd/s/q  "%AppData%\Tencent\QzoneMusic"2>NUL
rd/s/q "%ProgramData%\Tencent\QQProtect"2>NUL
rd/s/q  "%AppData%\Tencent\AndroidAssist"   2>NUL
rd/s/q  "%AppData%\Tencent\QQPhoneManager"  2>NUL
rd/s/q "%UserProfile%\AppData\Local\Tencent\QQPet"2>NUL
rd/s/q "%USERPROFILE%\Local Settings\Tencent\QQPet"2>NUL
rd/s/q "%USERPROFILE%\Local Settings\QQKartLiveUpdate"2>NUL
rd/s/q "%UserProfile%\Documents\Tencent Files\QPlus"   2>NUL
rd/s/q "%UserProfile%\My Documents\Tencent Files\QPlus"2>NUL
rd/s/q "%AllUsersProfile%\Application Data\Tencent\QQProtect"2>NUL
reg delete HKLM\SYSTEM\CurrentControlSet\services\QQProtect /F>NUL 2>NUL
for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do rd/s/q %%a:\QQMusicCache 2>NUL
regsvr32 /s Bin\TXSSO\Bin\SSOCommon.dll
regsvr32 /s Bin\TXSSO\QQPhoto\QQPhotoDrawEx.dll
regsvr32 /s Bin\TXSSO\QQPhoto\npQQPhotoDrawEx.dll
regsvr32 /s Bin\TXSSO\Bin\npSSOAxCtrlForPTLogin.dll
if exist Bin\Timwp.dll regsvr32  /s Bin\Timwp.dll
if exist Bin\AppCom.dll regsvr32 /s Bin\AppCom.dll
if exist Bin\CPHelper.dll regsvr32 /s Bin\CPHelper.dll
if exist Bin\TXPFProxy.dll regsvr32 /s Bin\TXPFProxy.dll
if exist Bin\KernelUtil.dll regsvr32 /s Bin\KernelUtil.dll
if exist Bin\TXPlatform.exe Bin\TXPlatform.exe /RegServer
md "%AppData%\Tencent\QQ\Misc\CSC\2052\7" >NUL 2>NUL
md "%AppData%\Tencent\QQ\Misc\CSC\2052\9" >NUL 2>NUL
md "%AppData%\Tencent\QQ\Misc\CSC\2052\13">NUL 2>NUL
Echo.NoLogoBanner>"%AppData%\Tencent\QQ\Misc\LogoFile"  2>NUL
Echo.NoTipLink>"%AppData%\Tencent\QQ\Misc\CSC\2052\13\7" 2>NUL
Echo.NoEighteen>"%AppData%\Tencent\QQ\Misc\CSC\2052\9\18" 2>NUL
Echo.NoLogoBanner> "%AppData%\Tencent\QQ\Misc\CSC\2052\7\4"2>NUL
Attrib +r "%AppData%\Tencent\QQ\Misc\LogoFile" >NUL 2>NUL
Attrib +r "%AppData%\Tencent\QQ\Misc\CSC\2052\7\4" >NUL 2>NUL
Attrib +r "%AppData%\Tencent\QQ\Misc\CSC\2052\9\18" >NUL 2>NUL
Attrib +r "%AppData%\Tencent\QQ\Misc\CSC\2052\13\7" >NUL 2>NUL
xcopy /s/i/y Bin\TXSSO\QQApp "%AppData%\Tencent\QQ\QQApp">NUL 2>NUL
xcopy /s/i/y Bin\TXSSO\CSC "%AppData%\Tencent\QQ\Misc\CSC">NUL 2>NUL
xcopy /s/i/y Bin\TXSSO\ClientType "%AppData%\Tencent\QQ\Misc\ClientType">NUL 2>NUL
xcopy /s/i/y Bin\TXSSO\MainMenu "%AppData%\Tencent\QQ\Misc\MainMenu">NUL
regsvr32 /s Plugin\Com.Tencent.NetDisk\Bin\QQDisk\Bin\TXFTNActiveX.dll
if exist Bin\QQExternal.exe Bin\QQExternal.exe /SetupRegister
reg add HKLM\Software\Tencent\QQ2009 /v Install /d "%~dp0\" /F>NUL
reg add HKLM\Software\TENCENT\QQ2009 /v version /d "52.51.0.8550.0" /F>NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Tencent\QQ2009 /v Install /d "%~dp0\" /F>NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Wow6432Node\TENCENT\QQ2009 /v version /d "52.51.0.8550.0" /F>NUL
regsvr32 /s Bin\TXSSO\QzoneMusic\QQMusicAddin\wmadmod.dll
if exist Bin\TXSSO\QzoneMusic\npQzoneMusic.dll regsvr32 /s Bin\TXSSO\QzoneMusic\npQzoneMusic.dll
if exist Bin\TXSSO\QzoneMusic\QzoneMusic.dll regsvr32 /s Bin\TXSSO\QzoneMusic\QzoneMusic.dll
if exist Bin\TXSSO\QzoneMusic\QzoneMusic.exe regsvr32 /s Bin\TXSSO\QzoneMusic\QzoneMusic.exe
reg add HKCR\Interface\{D9FEA452-F2BD-4ED4-80FC-7814B46915E5} /ve /t REG_SZ /d "IMusicPlayer" /F>NUL
reg add HKCR\Interface\{D9FEA452-F2BD-4ED4-80FC-7814B46915E5}\ProxyStubClsid /ve /t REG_SZ /d "{00020424-0000-0000-C000-000000000046}" /F>NUL
reg add HKCR\Interface\{D9FEA452-F2BD-4ED4-80FC-7814B46915E5}\ProxyStubClsid32 /ve /t REG_SZ /d "{00020424-0000-0000-C000-000000000046}" /F>NUL
reg add HKCR\Interface\{D9FEA452-F2BD-4ED4-80FC-7814B46915E5}\TypeLib /ve /t REG_SZ /d "{4560D45A-97D8-47F8-8C0B-09C713FC76F9}" /F>NUL
reg add HKCR\Interface\{D9FEA452-F2BD-4ED4-80FC-7814B46915E5}\TypeLib /v version /d "1.0" /F>NUL
reg add HKCR\TypeLib\{4560D45A-97D8-47F8-8C0B-09C713FC76F9}\1.0\0\win32 /ve /t REG_SZ /d "%~dp0Bin\TXSSO\QzoneMusic\QzoneMusic.exe" /F>NUL
reg add HKCR\CLSID\{B45AB714-91D3-4F3D-99A2-D8E6827E2914} /ve /t REG_SZ /d "MusicPlayer Class" /F>NUL
reg add HKCR\CLSID\{B45AB714-91D3-4F3D-99A2-D8E6827E2914} /v AppID /d "{2865A9E2-A483-4031-A2DA-824B2FB3E848}" /F>NUL
reg add HKCR\CLSID\{B45AB714-91D3-4F3D-99A2-D8E6827E2914}\LocalServer32 /ve /t REG_SZ /d "%~dp0Bin\TXSSO\QzoneMusic\QzoneMusic.exe" /F>NUL
reg add HKCR\CLSID\{B45AB714-91D3-4F3D-99A2-D8E6827E2914}\ProgID /ve /t REG_SZ  /d "QzoneMusic.MusicPlayer.1" /F>NUL
reg add HKCR\CLSID\{B45AB714-91D3-4F3D-99A2-D8E6827E2914}\TypeLib /ve /t REG_SZ /d "{4560D45A-97D8-47F8-8C0B-09C713FC76F9}" /F>NUL
reg add HKCR\CLSID\{B45AB714-91D3-4F3D-99A2-D8E6827E2914}\VersionIndependentProgID /ve /t REG_SZ /d "QzoneMusic.MusicPlayer" /F>NUL
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\腾讯QQ.lnk""):b.TargetPath=""%~dp0Bin\QQ.exe"":b.WorkingDirectory=""%~dp0Bin"":b.Save:close")
ECHO.&ECHO.绿化完成! &PAUSE >NUL 2>NUL&exit
:Un
taskkill /f /im QQ*  >NUL 2>NUL
taskkill /f /im TXP* >NUL 2>NUL
rd/s/q "%AppData%\Tencent\QQ"2>NUL
rd/s/q "%ProgramData%\QQPet"2>NUL
rd/s/q "%AppData%\Tencent\Users"2>NUL
rd/s/q "%AppData%\Tencent\QTalk"2>NUL
rd/s/q "%AppData%\QQAppAssistant"2>NUL
rd/s/q  "%AppData%\Tencent\Logs"2>NUL
rd/s/q "%AppData%\Tencent\TXSSO"2>NUL
rd/s/q "%AppData%\Tencent\STemp"2>NUL
rd/s/q "%AppData%\Tencent\DeskUpdate"2>NUL
rd/s/q  "%AppData%\Tencent\QzoneMusic"2>NUL
rd/s/q  "%AppData%\Tencent\AndroidAssist"2>NUL
rd/s/q  "%AppData%\Tencent\QQPhoneManager"2>NUL
rd/s/q "%AllUsersProfile%\Application Data\QQPet"2>NUL
rd/s/q "%UserProfile%\AppData\Local\Tencent\QQPet"2>NUL
rd/s/q "%USERPROFILE%\Local Settings\Tencent\QQPet"2>NUL
rd/s/q "%USERPROFILE%\Local Settings\QQKartLiveUpdate"2>NUL
rd/s/q "%ProgramData%\Tencent\QQProtect"2>NUL
rd/s/q "%AllUsersProfile%\Application Data\Tencent\QQProtect"2>NUL
rd/s/q "%UserProfile%\AppData\Local\Tencent\Misc"2>NUL
reg delete HKLM\SOFTWARE\Classes\QQPet /F>NUL 2>NUL
reg delete HKLM\SOFTWARE\Wow6432Node\Classes\QQPet /F>NUL 2>NUL
reg delete HKCU\Software\Tencent\AndroidAssistant /F>NUL 2>NUL
reg delete HKCU\Software\Classes\EMOTION.File /F    >NUL 2>NUL
reg delete HKCU\Software\Classes\EMOTION.Package /F >NUL 2>NUL
reg delete HKLM\Software\Wow6432Node\Tencent\QQ2009 /F>NUL 2>NUL
reg delete HKLM\Software\Wow6432Node\Classes\Tencent /F>NUL 2>NUL
reg delete HKLM\SYSTEM\CurrentControlSet\services\QQProtect /F>NUL 2>NUL
regsvr32 /s /u Bin\TXSSO\Bin\SSOCommon.dll
regsvr32 /s /u Bin\TXSSO\QQPhoto\QQPhotoDrawEx.dll
regsvr32 /s /u Bin\TXSSO\QQPhoto\npQQPhotoDrawEx.dll
regsvr32 /s /u Bin\TXSSO\Bin\npSSOAxCtrlForPTLogin.dll
regsvr32 /s /u Plugin\Com.Tencent.NetDisk\Bin\QQDisk\Bin\TXFTNActiveX.dll
reg delete HKCU\Software\Tencent\Plugin /F  >NUL 2>NUL
reg delete HKCU\Software\Tencent\QQ2009 /F  >NUL 2>NUL
reg delete HKLM\Software\Tencent\QQ2009 /F  >NUL 2>NUL
reg delete HKCU\Software\Classes\Tencent /F >NUL 2>NUL
reg delete HKLM\Software\Classes\Tencent /F >NUL 2>NUL
reg delete HKCU\Software\Classes\EMOTION.File /F    >NUL 2>NUL
reg delete HKCU\Software\Classes\EMOTION.Package /F >NUL 2>NUL
reg delete HKLM\Software\Wow6432Node\Tencent\QQ2009 /F>NUL 2>NUL
reg delete HKLM\Software\Wow6432Node\Classes\Tencent /F>NUL 2>NUL
if exist Bin\Timwp.dll regsvr32 /s /u Bin\Timwp.dll
if exist Bin\AppCom.dll regsvr32 /s /u Bin\AppCom.dll
if exist Bin\CPHelper.dll regsvr32 /s /u Bin\CPHelper.dll
if exist Bin\TXPFProxy.dll regsvr32 /s /u Bin\TXPFProxy.dll
if exist Bin\KernelUtil.dll regsvr32 /s /u Bin\KernelUtil.dll
if exist Bin\TXPlatform.exe Bin\TXPlatform.exe /UnregServer
if exist Bin\TXSSO\QzoneMusic\QQMusicAddin\wmadmod.dll regsvr32 /s /u Bin\TXSSO\QzoneMusic\QQMusicAddin\wmadmod.dll
if exist Bin\TXSSO\QzoneMusic\npQzoneMusic.dll regsvr32 /s /u Bin\TXSSO\QzoneMusic\npQzoneMusic.dll
if exist Bin\TXSSO\QzoneMusic\QzoneMusic.dll regsvr32 /s /u Bin\TXSSO\QzoneMusic\QzoneMusic.dll
if exist Bin\TXSSO\QzoneMusic\QzoneMusic.exe regsvr32 /s /u Bin\TXSSO\QzoneMusic\QzoneMusic.exe
for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do rd/s/q %%a:\QQMusicCache 2>NUL
reg delete HKLM\Software\Classes\TypeLib\{4560D45A-97D8-47F8-8C0B-09C713FC76F9} /F>NUL 2>NUL
reg delete HKLM\Software\Classes\CLSID\{B45AB714-91D3-4F3D-99A2-D8E6827E2914}  /F>NUL 2>NUL
reg delete HKCR\Interface\{D9FEA452-F2BD-4ED4-80FC-7814B46915E5}  /F>NUL 2>NUL
ECHO.&ECHO.卸载完成! &PAUSE >NUL 2>NUL
