> >
> >
> > 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