Home All Groups Group Topic Archive Search About
Author
13 May 2005 11:55 PM
Rich
I am writing a program that will remove some adware, but I need some
way to close some processes that are not windowed. If anyone can post
an example for the program "exactUpdate.exe" it would be greatly
apriacated.

Author
14 May 2005 12:22 AM
Crouchie1998
All you need to do is declare an Integer that Gets Process By Name. When you
have the process id you can just 'Kill' it - simple

Crouchie1998
BA (HONS) MCP MCSE
Author
14 May 2005 12:26 AM
Herfried K. Wagner [MVP]
"Rich" <RMSUPERSTA***@gmail.com> schrieb:
>I am writing a program that will remove some adware, but I need some
> way to close some processes that are not windowed. If anyone can post
> an example for the program "exactUpdate.exe" it would be greatly
> apriacated.

Take a look at the 'System.Diagnostics.Process' class and its 'Kill' method.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
14 May 2005 12:45 AM
Rich
Herfried K. Wagner [MVP] wrote:
Show quoteHide quote
> "Rich" <RMSUPERSTA***@gmail.com> schrieb:
> >I am writing a program that will remove some adware, but I need some
> > way to close some processes that are not windowed. If anyone can
post
> > an example for the program "exactUpdate.exe" it would be greatly
> > apriacated.
>
> Take a look at the 'System.Diagnostics.Process' class and its 'Kill'
method.
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>

Yeah, I can see it in the object browser but it is not avalible when I
am trying to program. I have it set up as below:

Dim D As New System.Diagnostics.Process
        D =

What should I do With D or should I just get rid of this?
Author
14 May 2005 1:06 AM
Herfried K. Wagner [MVP]
"Rich" <RMSUPERSTA***@gmail.com> schrieb:
> Yeah, I can see it in the object browser but it is not avalible when I
> am trying to program. I have it set up as below:
>
> Dim D As New System.Diagnostics.Process
>        D =
>
> What should I do With D or should I just get rid of this?

\\\
Dim Processes() As Process = Process.GetProcessesByName("bla")
For Each p As Process In Processes
    p.Kill()
Next p
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
14 May 2005 5:53 AM
Crouchie1998
That's what I would do too, but remember to add the import line:

Imports System.Diagnostics

Obviously, Herfried's "bla" is your "exactUpdate.exe"

Crouchie1998
BA (HONS) MCP MCSE
Author
14 May 2005 11:05 AM
Herfried K. Wagner [MVP]
"Crouchie1998" <crouchie1998@spamcop.net> schrieb:
> That's what I would do too, but remember to add the import line:
>
> Imports System.Diagnostics

I didn't mention that because VB.NET project templates include a
project-wide import for this namespace.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
14 May 2005 5:37 PM
Crouchie1998
You just uploaded the answer to the question a few seconds before I wound
have uploaded the same code myself

Oh well. At least the user has his/her answer now.

Take it easy, Herfried

Crouchie1998
BA (HONS) MCP MCSE
Author
14 May 2005 6:06 PM
Herfried K. Wagner [MVP]
"Crouchie1998" <crouchie1998@spamcop.net> schrieb:
> Oh well. At least the user has his/her answer now.
>
> Take it easy, Herfried

:-)

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
23 May 2005 9:10 PM
Rich
Well, that seems to have worked.