2023.08.04 Close the new version of PC-side QQ advertisement

Create a new txt file with any file name

Copy the following code to the file

@echo off
rem 获取管理员权限

%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~n0 ::","","runas",1)(window.close)&&exit

rem 开始将广告dll设置为只读
for /f "tokens=1* delims==" %%a in ('ftype Tencent') do (
    set QQFilePath=%%~dpbQQ.exe
)
set RepalceStr=Plugin\Com.Tencent.Advertisement\Bin\Advertisement.dll
call set DllPath=%QQFilePath:Bin\QQ.exe=%%RepalceStr%%
echo %DllPath%

attrib +r "%DllPath%"  

pause

Then change the file name suffix from .txt to .bat, and double-click to run it.

This method can be applied to advertisements of other software, provided that you can find out which dll it is.

Guess you like

Origin blog.csdn.net/qq_34124780/article/details/132099093