By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,702 Members | 1,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,702 IT Pros & Developers. It's quick & easy.

End Processes

P: n/a
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.

Nov 21 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
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
Nov 21 '05 #2

P: n/a
"Rich" <RM***********@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/>

Nov 21 '05 #3

P: n/a

Herfried K. Wagner [MVP] wrote:
"Rich" <RM***********@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?

Nov 21 '05 #4

P: n/a
"Rich" <RM***********@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/>
Nov 21 '05 #5

P: n/a
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
Nov 21 '05 #6

P: n/a
"Crouchie1998" <cr**********@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/>

Nov 21 '05 #7

P: n/a
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
Nov 21 '05 #8

P: n/a
"Crouchie1998" <cr**********@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/>
Nov 21 '05 #9

P: n/a
Well, that seems to have worked.

Nov 21 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.