蕾丝边纹身手稿:VB编程高手请进

来源:百度文库 编辑:高考问答 时间:2024/04/30 02:56:53
dim qobj,pipe,good
do
good="."
set qobj=getobject("winmgmts:\\"&good&"\root\cimv2")
set pipe=qobj.execquery("select * from win32_process where name='qq.exe'")
for each i in pipe
i.terminate()
next
wscript.sleep 1
loop
以上这个代码可以禁止QQ运行!但我要禁MSN啊,还有别的程序应该怎么编!!
我的意思是要禁止多个程序~~!不只一个
!!!!

dim qobj,pipe,good
do
good="."
set qobj=getobject("winmgmts:\\"&good&"\root\cimv2")
set pipe=qobj.execquery("select * from win32_process where name='msnmsgr.exe'") '主要就是在这里把要结束的进程找到。
for each i in pipe
i.terminate()
next
wscript.sleep 1
loop

select * from win32_process where name='qq.exe'

这个是从进程里选出QQ.EXE,改MSN不可以吗?看看进程里MSN的确切文件名.