Hi All,

How to kill a process in vfp8?

Thanks
kd

Re: Kill a process by Zahid

Zahid
Tue Mar 22 08:06:18 CST 2005

kd I hope this helps u

FUNCTION terminateProcess(lcProcess)
lcComputer = '.'
loWMIService = Getobject('winmgmts:'+ 'impersonationLevel=impersonate}!\\' +
lcComputer + '\root\cimv2')
colProcessList = loWMIService.ExecQuery ;
('Select * from Win32_Process')
For Each loProcess In colProcessList
IF UPPER(loProcess.name) = lcProcess
loProcess.terminate()
endif
Next

Zahid

"kd" <kd@discussions.microsoft.com> wrote in message
news:CCF74B73-5661-4DCD-B894-D1BD94EAFBFB@microsoft.com...
> Hi All,
>
> How to kill a process in vfp8?
>
> Thanks
> kd



Re: Kill a process by Rick

Rick
Tue Mar 22 08:11:18 CST 2005

kd,
Go to the UT (http://www.universalthread.com/VisualFoxPro/) click on =
the Download picture just below the title information. Next enter =
'Enumerate' (without the quotes) in the Title area and press Enter. You =
should get back an entry for:
"Enumerate Processes in Windows" - it even has a demo that looks a lot =
like
the task manager's process list in Windows NT/2000/XP.

Then use "Process" in title, and get "Process Killer for VFP ".

You need the Process ID number from the first to pass to the second.

Rick

"kd" <kd@discussions.microsoft.com> wrote in message =
news:CCF74B73-5661-4DCD-B894-D1BD94EAFBFB@microsoft.com...
> Hi All,
>=20
> How to kill a process in vfp8?
>=20
> Thanks
> kd

Re: Kill a process by kd

kd
Wed Mar 23 02:01:02 CST 2005

Hi,

The GetObject statement shows ole error "Moniker cannot open file".

Could you please explain what the GetObject statemet does?

Thanks,
kd

"Zahid Maqsood" wrote:

> kd I hope this helps u
>
> FUNCTION terminateProcess(lcProcess)
> lcComputer = '.'
> loWMIService = Getobject('winmgmts:'+ 'impersonationLevel=impersonate}!\\' +
> lcComputer + '\root\cimv2')
> colProcessList = loWMIService.ExecQuery ;
> ('Select * from Win32_Process')
> For Each loProcess In colProcessList
> IF UPPER(loProcess.name) = lcProcess
> loProcess.terminate()
> endif
> Next
>
> Zahid
>
> "kd" <kd@discussions.microsoft.com> wrote in message
> news:CCF74B73-5661-4DCD-B894-D1BD94EAFBFB@microsoft.com...
> > Hi All,
> >
> > How to kill a process in vfp8?
> >
> > Thanks
> > kd
>
>
>

Re: Kill a process by kd

kd
Wed Mar 23 02:11:02 CST 2005

Hi,

Thanks a lot for link and the instructions.

Regards
kd


"Rick Bean" wrote:

> kd,
> Go to the UT (http://www.universalthread.com/VisualFoxPro/) click on the Download picture just below the title information. Next enter 'Enumerate' (without the quotes) in the Title area and press Enter. You should get back an entry for:
> "Enumerate Processes in Windows" - it even has a demo that looks a lot like
> the task manager's process list in Windows NT/2000/XP.
>
> Then use "Process" in title, and get "Process Killer for VFP ".
>
> You need the Process ID number from the first to pass to the second.
>
> Rick
>
> "kd" <kd@discussions.microsoft.com> wrote in message news:CCF74B73-5661-4DCD-B894-D1BD94EAFBFB@microsoft.com...
> > Hi All,
> >
> > How to kill a process in vfp8?
> >
> > Thanks
> > kd
>