Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To know program running
Message
 
À
21/04/2004 03:32:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00896749
Message ID:
00896959
Vues:
24
If you can and want to use WMI, you can get a list of all processes running in your (or a remote computer), for example:
lparameters tcComputer
local lcComputer, loWMIService, loProcess, loProcesses

lcComputer		= Iif(Vartype(tcComputer) = 'C' and not Empty(tcComputer), tcComputer, '.')
loWMIService		= GetObject("winmgmts://" + lcComputer + "/root/cimv2")
loProcesses		= loWMIService.ExecQuery("SELECT * FROM Win32_Process")
For Each loProcess in loProcesses
	with loProcess
		? .Name, .ExecutablePath, .caption, .commandline, Ctot(Transform(.CreationDate, '@R 9999-99-99T99:99:9999'))
	endwith
Next
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform