autoit 禁止QQ运行 AutoIT写的禁止QQ运行的程序代码
人气:0想了解AutoIT写的禁止QQ运行的程序代码的相关内容吗,在本文为您仔细讲解autoit 禁止QQ运行的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:AutoIT,禁止QQ运行,下面大家一起来学习吧。
if ProcessExists("qq.exe") then $QQPID = ProcessExists("qq.exe")
ProcessClose ($QQPID)
endif
===============================================================
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colMonitoredProcesses = objWMIService.ExecNotificationQuery("select * from __instancecreationevent within 1 where TargetInstance isa 'Win32_Process'")
i = 0
Do While i = 0
Set objLatestProcess = colMonitoredProcesses.NextEvent
strPrs = LCase(objLatestProcess.TargetInstance.Name)
If InStr(strPrs,"qq") <> "0" Then
objLatestProcess.TargetInstance.Terminate
End If
Set objLatestProcess = Nothing
Loop
加载全部内容