🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7621

Re: Terminate a Process

#7621
From: Vladimir Afanasyev
Date: Mon, 17 Jan 2005 17:33
16 lines
1318 bytes
>
>strComputer = "."
>Set objWMIService = GetObject("winmgmts:" _
>    & "{impersonationLevel=impersonate}!\\" _
>    & strComputer & "\root\cimv2")
>Set colProcessList = objWMIService.ExecQuery _
>    ("Select * from Win32_Process Where Name = 'Notepad.exe'")
>For Each objProcess in colProcessList
>    objProcess.Terminate()
>Next
>

Similar code you can find in my WMI samples (codecentral) that I 
refered in my previous letter.
Vladimir.
Technical Details
Message-ID: <41ebf704$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41ea997d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c4e3da735366ab7e
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Subject: Re: Terminate a Process
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 83.218.237.46     
X-Forwarded-For: unknown
References:  <41ea997d@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <41ebf704$1@newsgroups.borland.com>
Date: 17 Jan 2005 09:33:56 -0800
X-Trace: newsgroups.borland.com 1105983236 207.105.83.66 (17 Jan 2005 09:33:56 -0800)
Lines: 16
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail