Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test outlook open?
Message
From
08/01/2010 09:19:08
 
 
To
07/01/2010 17:09:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01442564
Message ID:
01442761
Views:
65
>thanks so much for example code Greg. i read in the premable that this searches window titles - my window title is 'inbox - microsoft outlook' - since that is the default i have outlook set to for appearance - so another computer may have some other setting.
>
>it doesn't seem that this will detect programs running but rather windows opened. maybe i'm getting getting wires crossed. i have tried variation of this without being able to get .f. reading.
>
>k

Ok, how about this one.
* The PEM of the Win32_Process class
* http://msdn.microsoft.com/en-us/library/aa394372(VS.85).aspx

LPARAMETERS  tcPattern
LOCAL loCIMV2, loProcesses
loCIMV2        = GETOBJECT("winmgmts://localhost/root/cimv2")
loProcesses    = loCIMV2.ExecQuery("SELECT * FROM Win32_Process where Name like '"+tcPattern+"'")
*!*	FOR EACH objProcess IN loProcesses
*!*		*-- read PEM
*!*	NEXT
RETURN loProcesses.COUNT>0
and the test...
? isRunning("Outlook.exe")
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform