将下列命令行写成批处理运行即可去除Windows平台QQ的广告。
@ECHO OFF MODE CON COLS=20 LINES=3 ECHO UACTEST>"%WINDIR%\SYSTEM32\UAC_TEST.XB" IF EXIST "%WINDIR%\SYSTEM32\UAC_TEST.XB" GOTO GOTADMIN ECHO SET UAC = CREATEOBJECT^("SHELL.APPLICATION"^) > "%TEMP%\GETADMIN.VBS" ECHO UAC.SHELLEXECUTE "%~S0", "", "", "RUNAS", 1 >> "%TEMP%\GETADMIN.VBS" "%TEMP%\GETADMIN.VBS" EXIT /B :GOTADMIN IF EXIST "%TEMP%\GETADMIN.VBS" ( DEL "%TEMP%\GETADMIN.VBS" ) IF EXIST "%WINDIR%\SYSTEM32\UAC_TEST.XB" ( DEL "%WINDIR%\SYSTEM32\UAC_TEST.XB" ) PUSHD "%~DP0" TITLE QQ去广告 COLOR A MODE CON COLS=55 LINES=15 echo. echo. echo.请您关闭正在运行的QQ,然后按任意键继续&PAUSE>NUL taskkill /im qq.exe >NUL echo 127.0.0.1 fodder.qq.com >>C:\Windows\System32\Drivers\etc\hosts echo 127.0.0.1 adshmct.qq.com >>C:\Windows\System32\Drivers\etc\hosts echo 127.0.0.1 hm.l.qq.com >>C:\Windows\System32\Drivers\etc\hosts echo 127.0.0.1 adshmmsg.qq.com >>C:\Windows\System32\Drivers\etc\hosts echo 127.0.0.1 q.i.gdt.qq.com >>C:\Windows\System32\Drivers\etc\hosts echo 127.0.0.1 v.gdt.qq.com >>C:\Windows\System32\Drivers\etc\hosts cd %AppData%\Tencent\QQ\Misc rd /s /q com.tencent.advertisement >NUL echo >com.tencent.advertisement cd "%AppData%\Tencent\Users\" del misc.db /s /q >NUL cls echo. ECHO.去广告成功,按任意键退出&pause>nul EXIT