@ECHO OFF&PUSHD %~DP0 &TITLE 绿化卸载(小俊修改)
mode con cols=36 lines=22
color 2F
>NUL 2>&1 REG.exe query "HKU\S-1-5-19" || (
    ECHO SET UAC = CreateObject^("Shell.Application"^) > "%TEMP%\Getadmin.vbs"
    ECHO UAC.ShellExecute "%~f0", "%1", "", "runas", 1 >> "%TEMP%\Getadmin.vbs"
    "%TEMP%\Getadmin.vbs"
    DEL /f /q "%TEMP%\Getadmin.vbs" 2>NUL
    Exit /b
)
:Menu
Cls
@ echo.
@ echo.  菜单选项：
@ echo.
@ echo.   1.绿化[必须]
@ echo. 
@ echo.   2.启动QQ管家
@ echo.
@ echo.   3.启动QQ管家设置
@ echo.
@ echo.   4.创建桌面图标
@ echo.
@ echo.   5.卸载
@ echo.
set /p xj= 输入数字按回车：
if /i "%xj%"=="1" Goto Install
if /i "%xj%"=="2" Goto Start
if /i "%xj%"=="3" Goto Startup settings
if /i "%xj%"=="4" Goto Establish
if /i "%xj%"=="5" Goto Uninstall
@ echo.
echo  选择无效，请重新输入
ping -n 2 127.1>nul 
goto menu
:Install
:: 安装前结束相关进程
@ echo.
echo  正在结束相关进程
taskkill /f /im QQPCTray.exe  >NUL 2>NUL
taskkill /f /im QQPConfig.exe  >NUL 2>NUL
taskkill /f /im QQPCMgr.exe  >NUL 2>NUL
@ echo.
echo  正在绿化中，请稍等
::清理和优化相关数据
if exist "%WinDir%\SysWOW64" reg delete HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run /va /F>NUL
if not exist "%WinDir%\SysWOW64" reg delete HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run /va /F>NUL
rd/s/q "%AppData%\Tencent\Logs"2>NUL
rd/s/q "%AppData%\Tencent\DeskUpdate"2>NUL
rd/s/q "%AppData%\Tencent\QQPCMgr"2>NUL
rd/s/q "%ProgramData%\Tencent\QQPCMgr"2>NUL
rd/s/q "%AppData%\Tencent\TXSSO\SSOConfig\AppDB\_TSA_QQPCMgr"2>NUL
rd/s/q "plugins\malware\logo"2>NUL
rd/s/q "FtSysCommonMgrGF"2>NUL
del/f  "plugins\SysHomePage\ScanCleanPerformance.dat" >NUL 2>NUL
del/f  "asdinfo.dat" >NUL 2>NUL
del/f  "GarbageCleanHP.ini" >NUL 2>NUL
del/f  "nodisturb.ini" >NUL 2>NUL
del/f  "QMTask.dat" >NUL 2>NUL
del/f  "QMNetworkMgr.ini" >NUL 2>NUL
del/f  "SafeLocations.dat" >NUL 2>NUL
del/f  "StartupLog_2.log" >NUL 2>NUL
del/f  "sysdeepopt.ini" >NUL 2>NUL
del/f  "SysOpt.ini" >NUL 2>NUL
del/f  "QMNetworkComm.ini" >NUL 2>NUL
if not exist "%WinDir%\SysWOW64" reg add HKLM\Software\Tencent\QQPCMgr /v ConvertInstall /t REG_DWORD /d "0x0000001" /F>NUL
if not exist "%WinDir%\SysWOW64" reg add HKLM\Software\Tencent\QQPCMgr /v ExeString /d "%~dp0\QQPCMgr.exe" /F>NUL
if not exist "%WinDir%\SysWOW64" reg add HKLM\Software\Tencent\QQPCMgr /v InstallDir /d "%cd%" /F>NUL
if not exist "%WinDir%\SysWOW64" reg add HKLM\Software\Tencent\QQPCMgr /v Version /d "12.15.19627.208" /F>NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Wow6432Node\Tencent\QQPCMgr /v ConvertInstall /t REG_QWORD /d "0x0000001" /F>NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Wow6432Node\Tencent\QQPCMgr /v ExeString /d "%~dp0\QQPCMgr.exe" /F>NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Wow6432Node\Tencent\QQPCMgr /v InstallDir /d "%cd%" /F>NUL
if exist "%WinDir%\SysWOW64" reg add HKLM\Software\Wow6432Node\Tencent\QQPCMgr /v Version /d "12.15.19627.208" /F>NUL
xcopy /e/i/y QQPCMgr "%ProgramData%\Tencent\QQPCMgr">NUL 2>NUL
@ echo.
echo  绿化完成，请尽情使用吧
ping -n 2 140.1>nul
goto menu
:Start
@ echo.
echo  正在启动QQ管家
start QQPCMgr.exe
@ echo.
echo  已启动
ping -n 2 140.1>nul
goto menu
:Startup settings
@ echo.
echo  正在启动QQ管家设置
start QQPConfig.exe
@ echo.
echo  已启动
ping -n 2 140.1>nul
goto menu
:Establish
@ echo.
echo  正在创建桌面图标，请稍等
ping -n 2 127.1>nul
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\QQ管家加速版.lnk""):b.TargetPath=""%~dp0QQPCMgr.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close")
@ echo.
echo  已创建桌面图标，请尽情使用吧
ping -n 2 140.1>nul
goto menu
:Uninstall
:: 卸载前结束相关进程
@ echo.
echo  正在结束相关进程
taskkill /f /im QQPCTray.exe  >NUL 2>NUL
taskkill /f /im QQPConfig.exe  >NUL 2>NUL
taskkill /f /im QQPCMgr.exe  >NUL 2>NUL
@ echo.
echo  正在卸载中，请稍等
::清理相关数据
rd/s/q "%AppData%\Tencent\DeskUpdate"2>NUL
rd/s/q "%AppData%\Tencent\Logs"2>NUL
rd/s/q "%AppData%\Tencent\QQPCMgr"2>NUL
rd/s/q "%ProgramData%\Tencent\QQPCMgr"2>NUL
rd/s/q "%AppData%\Tencent\TXSSO\SSOConfig\AppDB\_TSA_QQPCMgr"2>NUL
rd/s/q "plugins\malware\logo"2>NUL
rd/s/q "FtSysCommonMgrGF"2>NUL
del/f  "plugins\SysHomePage\ScanCleanPerformance.dat" >NUL 2>NUL
del/f  "asdinfo.dat" >NUL 2>NUL
del/f  "GarbageCleanHP.ini" >NUL 2>NUL
del/f  "nodisturb.ini" >NUL 2>NUL
del/f  "QMTask.dat" >NUL 2>NUL
del/f  "QMNetworkMgr.ini" >NUL 2>NUL
del/f  "SafeLocations.dat" >NUL 2>NUL
del/f  "StartupLog_2.log" >NUL 2>NUL
del/f  "sysdeepopt.ini" >NUL 2>NUL
del/f  "SysOpt.ini" >NUL 2>NUL
del/f  "QMNetworkComm.ini" >NUL 2>NUL
reg delete HKLM\Software\Tencent\QQPCMgr /F>NUL 2>NUL
reg delete HKLM\Software\Wow6432Node\Tencent\QQPCMgr /F>NUL 2>NUL
reg delete HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run /va /F>NUL
reg delete HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Run /va /F>NUL
del /f /q "%userprofile%"\Desktop\QQ管家加速版.lnk  >NUL 2>NUL
del /f /q "%userprofile%"\桌面\QQ管家加速版.lnk  >NUL 2>NUL
@ echo.
echo  卸载完成，欢迎再次使用 
ping -n 2 140.1>nul
goto menu