Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Chris Chamberlain
  Where is Chris Chamberlain?
 GL6 0PN
 United Kingdom
 Chris Chamberlain
 To: Marcia Akins
  Where is Marcia Akins?
 Akorn
 Ohio - United States
 Marcia Akins
 Tags
Subject: RE: RUNNING EXE
Thread ID: 104555 Message ID: 104741 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Sunday, August 20, 2006 9:17:06 AM         
   


Marcia

I misread what zakari what trying to achieve.

If he needs to determine if an app is running, then substitute the code

FOR EACH oProcess IN oResult
     oProcess.Terminate(0)
NEXT
with something like
llmyApp1 = .F.
FOR EACH oProcess IN oResult
     llmyApp1 = .T.
NEXT

IF llmyApp1
  * code	
ENDI

Alternatively, if he wants to close the app having determined it's running, add suitable cleanup code before the
oProcess.Terminate(0)
statement within the FOR...NEXT block.

Either way, using WMI is probably going to be the shortest route to achieving what he needs.

ENTIRE THREAD

RUNNING EXE Posted by zakaria hamieh @ 8/17/2006 3:09:17 PM
RE: RUNNING EXE Posted by Ken Murphy @ 8/17/2006 3:56:16 PM
RE: RUNNING EXE Posted by Pete Sass @ 8/18/2006 6:45:41 PM
RE: RUNNING EXE Posted by Chris Chamberlain @ 8/19/2006 9:44:56 AM
RE: RUNNING EXE Posted by Marcia Akins @ 8/19/2006 1:13:25 PM
RE: RUNNING EXE Posted by Borislav Borissov @ 8/19/2006 8:37:25 PM
RE: RUNNING EXE Posted by Chris Chamberlain @ 8/20/2006 9:17:06 AM
RE: RUNNING EXE Posted by zakaria hamieh @ 8/20/2006 9:24:10 AM