Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running processes
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01013372
Message ID:
01013478
Views:
23
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
Previous
Reply
Map
View

Click here to load this message in the networking platform