@ECHO OFF&PUSHD %~DP0 &TITLE 绿化和选项
mode con cols=36 lines=20
color 2F
Rd "%WinDir%\system32\test_permissions" >NUL 2>NUL
Md "%WinDir%\System32\test_permissions" 2>NUL||(Echo 请使用右键管理员身份运行！&&PAUSE >NUL&&EXIT)
Rd "%WinDir%\System32\test_permissions" 2>NUL
SetLocal EnableDelayedExpansion
:Menu
Cls
@ echo.
@ echo.　　　　　 菜 单 选 项
@ echo.
@ echo.     绿化[必须] → 请输入1
@ echo. 
@ echo.     启动QQ管家 → 请输入2
@ echo.
@ echo.     启动QQ管家设置 → 请输入3
@ 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 QQPCMgr.exe  >NUL 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
reg add HKLM\Software\Tencent\QQPCMgr /v ConvertInstall /t REG_DWORD /d "0x0000001" /F>NUL
reg add HKLM\Software\Tencent\QQPCMgr /v ExeString /d "%~dp0\QQPCMgr.exe" /F>NUL
reg add HKLM\Software\Tencent\QQPCMgr /v InstallDir /d "%cd%" /F>NUL
reg add HKLM\Software\Tencent\QQPCMgr /v Version /d "11.5.17454.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 "11.5.17454.208" /F>NUL
goto Install2
:Start
@ echo.
echo 　　　正在启动QQ管家..
start QQPCMgr.exe
goto qidong
:Startup settings
@ echo.
echo 　　　正在启动QQ管家设置..
start QQPConfig.exe
goto qidong
:Establish
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")
goto menu
:Uninstall
@ echo.
echo 　　　正在卸载中..请稍等..
taskkill /f /im QQPCTray.exe  >NUL 2>NUL
taskkill /f /im QQPCMgr.exe  >NUL 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
if not exist "%WinDir%\SysWOW64" reg delete HKLM\Software\Tencent\QQPCMgr /F>NUL 2>NUL
if exist "%WinDir%\SysWOW64" reg delete HKLM\Software\Wow6432Node\Tencent\QQPCMgr /F>NUL 2>NUL
del /f /q "%userprofile%"\Desktop\QQ管家加速版.lnk
del /f /q "%userprofile%"\桌面\QQ管家加速版.lnk
goto Uninstall2
:fanhui
@ ECHO.
ECHO 　　　设置完成..
goto menu
:Install2
@ ECHO.
ECHO 　　　安装完成..
goto menu
:Uninstall2
@ ECHO.
ECHO 　　　卸载完成..
goto menu
:qidong
@ ECHO.
ECHO 　　　启动成功..
goto menu
