Comment lister les processus actifs
- Code : Tout sélectionner
Dim svc As Variant
Dim sQuery As String
Set svc = GetObject("winmgmts:root\cimv2")
sQuery = "select * from win32_process"
Forall oproc In svc.execquery(sQuery)
Print oproc.Name & " = " & oproc.ExecutablePath
End Forall
Set svc = Nothing
Exit Sub
Testé sous Windows 2000.