End Processes

  • Thread starter Thread starter Rich
  • Start date Start date
R

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.
 
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
 
Rich said:
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.
 
Herfried said:
Take a look at the 'System.Diagnostics.Process' class and its 'Kill' method.

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?
 
Rich said:
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
///
 
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
 
Crouchie1998 said:
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top