@ECHO OFF
@echo ________________________________________________________________________________
@echo 			     海峰QQ2007修复程序
@echo ________________________________________________________________________________
@echo on
@ECHO OFF
IF EXIST "修复海峰QQ2007.bat" GOTO start
echo 你使用的不是海峰QQ，无法本修复程序！
pause
goto exit
:start
IF EXIST "%USERPROFILE%\「开始」菜单\程序\腾讯 QQ2007 海峰版\修复海峰QQ2007.LNK" goto start2
echo 你使用的海峰QQ不是正常安装的，修复可能失败！请到http://bbs.hfqq.cn下载最新安装版重新安装！
pause
:start2
echo 　　修复前，请关闭所有QQ相关程序和网页浏览器，否则修复可能失败！如果出现“另一个程序正在使用此文件，进程无法访问”，请检查QQ或浏览器是否关闭。还不行的话，请重启Windows或者进安全模式执行本程序。
pause
IF EXIST dat\vbscript copy dat\vbscript vbscript.dll >nul
IF EXIST dat\Timwp copy dat\Timwp Timwp.exe >nul
IF EXIST dat\Timwp1 copy dat\Timwp1 Timwp.dll >nul
IF EXIST "dat\TXPFProxy" copy "dat\TXPFProxy" "TXPFProxy.dll" >nul
IF EXIST dat\vbscript copy dat\vbscript vbscript.dll >nul
IF EXIST "dat\TXPlatform" copy "dat\TXPlatform" "TXPlatform.exe" >nul
IF EXIST dat\Replace copy dat\Replace hfdiy\Replace.exe >nul
IF EXIST dat\fineplus copy dat\fineplus hfdiy\fineplus.ini >nul
IF EXIST dat\KfConfig copy dat\KfConfig hfdiy\KfConfig.xml >nul
IF NOT EXIST %Windir%\system32\qqedit\ md %Windir%\system32\qqedit\
IF EXIST dat\qqedit copy dat\qqedit %Windir%\system32\qqedit\qqedit.dll >nul
IF NOT EXIST "%Windir%\system32\RealMediaSplitter.ax" copy "dat\RealMediaSplitter" "%Windir%\system32\RealMediaSplitter.ax" >nul
IF NOT EXIST %Windir%\system32\msvcp60.dll copy dat\msvcp60 %Windir%\system32\msvcp60.dll >nul
REGSVR32 /s "%Windir%\system32\RealMediaSplitter.ax"
REGSVR32 /s %Windir%\system32\qqedit\qqedit.dll
REGSVR32 /s "TXPFProxy.dll"
REGSVR32 /s Timwp.dll
IF EXIST "VQQPlayer.ocx" REGSVR32 /s "VQQPlayer.ocx"
IF EXIST CPHelper.dll REGSVR32 /s CPHelper.dll
IF EXIST %Windir%\system32\vbscript.dll REGSVR32 /s %Windir%\system32\vbscript.dll
IF NOT EXIST "QQNetDisk.dll" GOTO end
REGSVR32 /s "QQNetDisk.dll"
IF EXIST qdshm.dll REGSVR32 /s qdshm.dll
:end
echo 修复结束！
pause
:exit