473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

End Processes

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
9 1012
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
"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

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
"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
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
"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
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
"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
Well, that seems to have worked.

Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael Williams | last post by:
Hi, I am trying to understand the performance implications of running a number of separate ActiveXexe processes as opposed to a single ActiveXexe with multiple threads on a Windows 2000 server....
1
by: Markus Franz | last post by:
Hi. I created a little script: for currenturl in sys.argv: pid = os.fork() if pid == 0: signal.alarm(10) do_something() # placeholder for the download and print routine
6
by: Bob Swerdlow | last post by:
My application starts up a number of processes for various purposes using: self.popen = popen2.Popen3("/usr/local/bin/python -O "myscript.py") and then shuts them down when appropriate with...
15
by: Dirk Reske | last post by:
Hello, why doesn't this code work correctly? private int GetCpuUsage(Process proc) { DateTime time1,time2; TimeSpan timediff; double cpu1,cpu2,cpudiff;
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
4
by: AN | last post by:
Greetings, We make an ASP.NET web application and we host it for our customers. We have provisioned hardware and hope to be able to service around 200 customers on this hardware. The web...
35
by: Carl J. Van Arsdall | last post by:
Alright, based a on discussion on this mailing list, I've started to wonder, why use threads vs processes. So, If I have a system that has a large area of shared memory, which would be better? ...
3
by: xxs | last post by:
I have writen some codes as follow: #include <windows.h> #include <tlhelp32.h> #include <stdio.h> // Forward declarations: BOOL GetProcessList( ); BOOL ListProcessModules( DWORD dwPID...
1
by: jazon | last post by:
Let me start by saying this for an Operating Systems class. No, I don't expect the work to be done for me. The assignment is as follows: To be honest, I feel like a fish out of water, like...
6
by: Tim Arnold | last post by:
I have a bunch of processes to run and each one needs its own working directory. I'd also like to know when all of the processes are finished. (1) First thought was threads, until I saw that...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.