Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 To: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 Tags
Subject: RE: Kill EXE API
Thread ID: 416387 Message ID: 416421 # Views: 39 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Win32API programming
Date: Monday, December 29, 2014 12:07:30 PM         
   


> >
> >
KillProcess("YourApp.exe")
> > 
> > **************
> > Function KillProcess("cProcess")
> > **************
> > Local loWMI, lcQuery, loResult, loProcess
> > loWMI = Getobject("winmgmts://")
> > lcQuery = '"select * from win32_process where name='+"'"+Alltrim(m.cProcess)+"'"+ ' "'
> > lcSQL=&lcQuery
> > loResult = loWMI.ExecQuery(m.lcSQL)
> > If loResult.Count > 0
> > 	For Each loProcess In loResult
> > 		loProcess.Terminate(0)
> > 	Next
> > Endif
> > Endfunc

> >
> >
> > https://vfpx.codeplex.com/releases/view/99045
> > http://sandstorm36.blogspot.com
>
> No scripting?
>
> Mike Gagnon



Hi Mike,

Lately I have ran into clients were their IT departments have
disabled all scripting on all workstations. Due to this one
rather large program has to have all WMI code changed.

Pete "the IceMan", from the Great White North of Canada.
www.marathongriffincomputers.com

ENTIRE THREAD

Kill EXE API Posted by Pete Sass @ 12/29/2014 1:40:46 AM
RE: Kill EXE API Posted by Chuanbing Chen @ 12/29/2014 1:55:13 AM
RE: Kill EXE API Posted by Pete Sass @ 12/29/2014 2:09:06 AM
RE: Kill EXE API Posted by Jun Tangunan @ 12/29/2014 2:21:49 AM
RE: Kill EXE API Posted by Pete Sass @ 12/29/2014 3:11:45 AM
RE: Kill EXE API Posted by Jun Tangunan @ 12/29/2014 7:13:26 AM
RE: Kill EXE API Posted by Mike Gagnon @ 12/29/2014 3:12:39 AM
RE: Kill EXE API Posted by Jun Tangunan @ 12/29/2014 7:16:19 AM
RE: Kill EXE API Posted by Pete Sass @ 12/29/2014 12:07:30 PM
RE: Kill EXE API Posted by Mike Gagnon @ 12/29/2014 12:28:36 PM
RE: Kill EXE API Posted by Pete Sass @ 12/29/2014 1:46:26 PM
RE: Kill EXE API Posted by Greg Green @ 12/29/2014 3:44:35 AM
RE: Kill EXE API Posted by Pete Sass @ 12/29/2014 1:22:22 PM
RE: Kill EXE API Posted by Jun Tangunan @ 12/30/2014 1:30:04 AM
RE: Kill EXE API Posted by Mike Gagnon @ 12/30/2014 5:48:41 PM
RE: Kill EXE API Posted by Pete Sass @ 12/30/2014 6:20:59 PM
RE: Kill EXE API Posted by Victor Espina @ 12/29/2014 3:38:47 PM