Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To know program running
Message
 
To
21/04/2004 03:32:01
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00896749
Message ID:
00896959
Views:
25
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
Previous
Reply
Map
View

Click here to load this message in the networking platform