@echo off
title QQ小火箭安装/卸载 by 404
color 8F
mode con: cols=56 lines=17
ver | find "10.0" && goto menu 
ver | find "6.1" && goto menu 
ver | find "6.3" && goto menu 
ver | find "5.1" && goto xp
exit

:menu
echo.
echo.1.安装
echo. 
echo.
echo.2 卸载
echo.
echo.
echo.
echo.
echo.
echo.
echo.
SET /P ST=请选择：
if /I "%ST%"=="1" goto add
if /I "%ST%"=="2" goto del
pause >nul
exit

:xp
echo.
echo.1.安装
echo. 
echo.
echo.2 卸载
echo.
echo.
echo.
echo.
echo.
echo.
echo.
SET /P ST=请选择：
if /I "%ST%"=="1" goto add_xp
if /I "%ST%"=="2" goto del
pause >nul
exit

:add
cls
Echo Visual C++ 2005 Redistributable Package (x86)...
"%~dp0vcredist_x86.EXE" /Q
md "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\QMRealTimeSpeedupSkinCenter.zip" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SpeedupSkinConfig.etf" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\hot_ico.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\new_ico.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_77.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_carnival.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_christmas.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_commonweal2.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_earth.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_earth2.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_father2.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_holloween.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_homecoming2.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_kupao.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_lengtoo.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_mengwangxing2.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_mom.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_mom520.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_normal.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_peng.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_spring.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_spring2.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_youth.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_youth2.png" "%ProgramData%\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\小火箭.lnk""):b.TargetPath=""%~dp0QQPCRealTimeSpeedup.exe"":b.WorkingDirectory=""%~dp0\"":b.Save:close")
cls

rem 判断64位系统和32位系统
if /i %PROCESSOR_IDENTIFIER:~0,3%==x86 (
        goto reg32
) else (
        goto reg64
)
cls

:reg32
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQPCMgr" /v InstallDir /t REG_SZ /d "%~dp0\" /f>nul 2>nul
cls
echo.
echo  安装成功！按任意键退出！
pause >nul
exit


:reg64
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Tencent\QQPCMgr" /v InstallDir /t REG_SZ /d "%~dp0\" /f>nul 2>nul
cls
echo.
echo  安装成功！按任意键退出！
pause >nul
exit

:add_xp
cls
Echo Visual C++ 2005 Redistributable Package (x86)...
"%~dp0vcredist_x86.EXE" /Q
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQPCMgr" /v InstallDir /t REG_SZ /d "%~dp0\" /f>nul 2>nul
md "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\carnivalres.rdb" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter"
copy "%~dp0QMRealTimeSpeedupSkinCenter\halloweenres.rdb" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter"
copy "%~dp0QMRealTimeSpeedupSkinCenter\QMRealTimeSpeedupSkinCenter.zip" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SpeedupSkinConfig.etf" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\hot_ico.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\new_ico.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_77.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_carnival.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_christmas.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_commonweal2.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_earth.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_earth2.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_father2.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_holloween.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_homecoming2.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_kupao.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_lengtoo.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_mengwangxing2.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_mom.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_mom520.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_normal.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_peng.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_spring.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_spring2.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_youth.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
copy "%~dp0QMRealTimeSpeedupSkinCenter\SkinIcon\normal\rocket_youth2.png" "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr\QMRealTimeSpeedupSkinCenter\SkinIcon\normal"
mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\小火箭.lnk""):b.TargetPath=""%~dp0QQPCRealTimeSpeedup.exe"":b.WorkingDirectory=""%~dp0\"":b.Save:close")
cls
echo.
echo  安装成功！按任意键退出！
pause >nul
exit

:del 
taskkill /f /im QQPCRealTimeSpeedup.exe
sc stop TAOFrame
sc delete TAOFrame
del "%AppData%\Tencent\DeskUpdate\GlobalMgr.db"
del "%AppData%\Tencent\Logs\NetRepair.tlg"
del "%AppData%\Tencent\Logs\QQPCRealTimeSpeedup.tlg"
del "%AppData%\Tencent\Logs\TAOFrame.tlg"
del "%systemdrive%\Windows\System32\drivers\TAOKernel.sys"
del "%systemdrive%\Windows\System32\drivers\TAOKernelXP.sys"
del /q "%userprofile%\桌面\小火箭.lnk"
del /q "%userprofile%\desktop\小火箭.lnk"
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Tencent\QQPCMgr /f>nul 2>nul
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Tencent\QQPCMgr /f>nul 2>nul
rd /s/q %ProgramData%\Tencent\QQPCMgr
rd /s/q "%systemdrive%\Documents and Settings\All Users\Application Data\Tencent\QQPCMgr"
cls
echo.
echo  卸载成功！按任意键退出！
pause >nul
exit
