strComputer = "." ' 使用本地计算机
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
strQuery = "SELECT * FROM Win32_Process"
Set colItems = objWMIService.ExecQuery(strQuery)
For Each objItem In colItems
WScript.Echo "Process Name: " & objItem.Name
Next