用WMI对象列出系统所有进程
运行环境:分辨率:1440×900 色深:32位 操作系统:Windows XP 按键精灵版本:7.00.3730
//〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★说★明★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓// // [用WMI对象列出系统所有进程] // //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★定★义★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓// VBS Dim WMI,objs,obj,stt,Enum1 //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★设★置★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓// VBS Set WMI = GetObject("WinMgmts:") VBS Set objs = WMI.InstancesOf("Win32_Process") //〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓★开★始★〓〓〓〓〓〓〓〓〓〓〓〓〓☆〓〓// VBS stt=stt & vbcrlf & "For Each obj In objs " VBS stt=stt & vbcrlf & "Enum1 = Enum1 & obj.Description & vbcrlf" VBS stt=stt & vbcrlf & "Next" VBS Execute(stt) VBSCall RunApp("notepad") Delay 1000 SayExpression Enum1 EndScript