Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running processes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01013372
Message ID:
01013478
Vues:
24
YOu can use WMI to get the list:
local loLocator, loWMI, loProcesses, loProcess

loLocator	= CREATEOBJECT('WBEMScripting.SWBEMLocator')
loWMI		= loLocator.ConnectServer()
loProcesses	= loWMI.ExecQuery('Select * from Win32_Process')
FOR EACH loProcess IN loProcesses
	WITH loProcess
		? .ProcessID, .Name, .ExecutablePath
	ENDWITH
ENDFOR
Now, if you want some particular EXE, you can add it to the WQL sentence:
lcProcName	= "Notepad.EXE" && Case is not important
loProcesses	= loWMI.ExecQuery([Select * from Win32_Process where Name="]+lcProcName+["])
"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