Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: vinod kabdal
  Where is vinod kabdal?
 Delhi
 India
 vinod kabdal
 To: surinder singh
  Where is surinder singh?
 mumbai
 India
 surinder singh
Subject: RE: Close application in networking
Thread ID: 185084 Message ID: 185129 # Views: 2 # Ratings: 0
Version: Visual FoxPro 8 Category: Windows Vista and VFP
Date: Tuesday, July 22, 2008 1:54:15 PM         
   



> >
> >
> > Borislav Borissov
> >
> > I mean many user running application then i want to close application our system
> >
> > Thanks
> >
> > Vinod
>
> There may be more than one option to do the same.
> 1. Add a timer control to your application and check if there is any file named "sysAdmin.someExtention" from where the application is running.
> if this file exists then quit the application by prompting to that user, you can wait for some time for users to close the application, if they don't then execute your quit application code
>
> 2. You can run any background hidden application with your main application say "killprocess" and put a timer on this application which will check for the same and if that file found then will first kill your main application and then quits itself.
> you can get the code to kill process from either this site or from net.
>
> In your main prg execute this background application and also check for that file if it exists then don't start application and prompt user the necessary message.
>
>
> LOCAL loWMI, lcQuery, loResult, loProcess
> loWMI = GetObject("winmgmts://")
> lcQuery = "select * from win32_process where name='myApp.exe'"
> loResult = loWMI.ExecQuery(m.lcQuery)
> FOR EACH loProcess IN loResult
> 	loProcess.Terminate(0)
> NEXT
> 

> (if you are working with OEL then there is already developed application named killprocess and that is running there.)
>
> -----------------------------------------------------------------------------------------------
> Regards
> Surinder Singh
> Email: sur200@indiatimes.com
> Check my blog for details: http://weblogs.foxite.com/sur200
> ----------------------------------------------------------------------------------------
> *If you understand what you're doing, then you're not learning anything.



Surender

Thanks for Suggestion.


Vinod Kabdal

ENTIRE THREAD

Close application in networking Posted by vinod kabdal @ 7/22/2008 11:03:59 AM
RE: Close application in networking Posted by Borislav Borissov @ 7/22/2008 11:44:57 AM
RE: Close application in networking Posted by vinod kabdal @ 7/22/2008 12:59:59 PM
RE: Close application in networking Posted by Mike Gagnon @ 7/22/2008 1:22:13 PM
RE: Close application in networking Posted by surinder singh @ 7/22/2008 1:31:31 PM
RE: Close application in networking Posted by vinod kabdal @ 7/22/2008 1:54:15 PM