Private Sub Command1_Click()
List1.Clear
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcesses = objWMIService.ExecQuery("SELECT * FROM Win32_Process")
For Each objprocess In colProcesses
List1.AddItem objprocess.processid & " " & objprocess.Name & " " & objprocess.ExecutablePath
Next
End Sub
'--------------------------------取进程PID(ID),取进程列表,取进程路径