Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting if a process is running
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01168175
Message ID:
01168187
Views:
11
>I was wondering if anybody knew of a way of determining if a certain process was currently running on a win2000/xp machine. In other words... I have a news gathering vfp8 exe running 24/7 on a win2k machine and lately there have been stability issues. I would like to be able to determine if the process is running. If it is not then take the appropriate action (restart, email myself, etc).
>
>Anyhow, any help on this matter would be greatly appreciated!
>
>Thanks,
>
>JM

Something like:
lo = GetObject("winmgmts://localhost/root/cimv2")
loVFP7 = lo.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'VFP7.exe'")
?loVFP7.Count
Previous
Reply
Map
View

Click here to load this message in the networking platform