通过VBS访问WMI,获取当前所有进程信息

获取本机当前所有进程信息:

 

 

strComputer ="." Set objWMIService = GetObject("winmgmts://" & strComputer & "/root/cimv2") Set colProcess = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_PerfProc_Process",,48) For Each objItem in colProcess if objItem.Name <> "Idle" and objItem.Name <> "_Total" then print objItem.Name & ":"& objItem.PercentProcessorTime end if Next

你可能感兴趣的:(通过VBS访问WMI,获取当前所有进程信息)