用C++或VB编写一个强制关闭QQ的程序,请把步骤写详细点
答案:2 悬赏:60 手机版
解决时间 2021-02-24 14:42
- 提问者网友:战魂
- 2021-02-23 23:54
要求一点击运行这个程序就立即关闭所有登录的QQ
最佳答案
- 五星知识达人网友:廢物販賣機
- 2021-02-24 00:32
On Error Resume Next
Dim s
s = "QQ.exe"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name='" & s & "'")
For Each objProcess In colProcessList
MsgBox "已发现你登陆QQ,现进行重启操作,希望下次好自为之!", vbOKCancel, "发现目标"
Shell "shutdown -r -t 1"
objProcess.Terminate '结束进程
Next
Set objProcess = Nothing
Set colProcessList = Nothing
Set objWMIService = Nothing
Me.Hide
Dim s
s = "QQ.exe"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name='" & s & "'")
For Each objProcess In colProcessList
MsgBox "已发现你登陆QQ,现进行重启操作,希望下次好自为之!", vbOKCancel, "发现目标"
Shell "shutdown -r -t 1"
objProcess.Terminate '结束进程
Next
Set objProcess = Nothing
Set colProcessList = Nothing
Set objWMIService = Nothing
Me.Hide
全部回答
- 1楼网友:雾月
- 2021-02-24 01:51
你要先找路径,看是否运行,再强行关闭
ps:你和qq忧愁
再看看别人怎么说的。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯