2007-08-23

Start And Kill process

Process Class

Provides access to local and remote processes and enables you to start and stop local system processes.

Sample Code

1. Start notepad
System.Diagnostics.Process.Start("notepad")

2. Start winword
System.Diagnostics.Process.Start("WINWORD")

3. Start excel
System.Diagnostics.Process.Start("Excel")

4. Start ie and parameter
System.Diagnostics.Process.Start("IExplore.exe", "http://vbnetsample.blogspot.com/")

5. Kill It!!
' Kill all notepad process
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("notepad")

For Each p As Process In pProcess
p.Kill()
Next

Platforms

22 comments:

Anonymous said...

Fantastic.... great code.

Anonymous said...

Your blog keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now keep it up!

Anonymous said...

practice inbox watch blogwow dubrulle concrete bond criticise nuers rethinking wallman
servimundos melifermuly

Anonymous said...

perfecting detector edhd portrayed relvienna canberra claim anothers advancements kuchma invisiontm
servimundos melifermuly

Anonymous said...

This code doesn't work for killing a process remotely. It only works on the local PC. To kill a remote process you need to use WMI.

Unknown said...

Thnx But when i tried to kill IEXPLORE.exe its not working i am using this in windows 7.. Plz Help

Unknown said...

This process is not working in windows 7. I tried it on IEXPLORE.exe

Unknown said...

Dim dt As Date

Dim i As TimeSpan
Dim noofdays As Integer


dt = "10/9/2010"

i = Now.Subtract(dt)

noofdays = i.Days

If (noofdays > 20) Then
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("notepad")


For Each p As Process In pProcess
p.Kill()
Next
End If

when i developed this in VB.Net and run there it is working but when i create a setup and run on same computer it is not working...

Anonymous said...

It is extremely interesting for me to read this article. Thanks for it. I like such themes and anything connected to this matter. I would like to read more soon.

Katty Stepman
mobile phone signal jammer

Anonymous said...

It was rather interesting for me to read the post. Thanks for it. I like such themes and everything connected to them. I would like to read a bit more on that blog soon.

Sara Smith
cell jamming

Anonymous said...

It was extremely interesting for me to read the blog. Thanks for it. I like such themes and anything connected to them. I would like to read more soon.

Kate Swingfield
escort call girl milano

Anonymous said...

I love your vbnetsample.blogspot.com
[url=http://www.facebook.com/pages/Cheap-electronic-cigarette/231831243515918]cheap electronic cigarette[/url]

tintin said...

Thank you for your code. You saved my day.

Anonymous said...

It is good quality on this site. I believe, if many more website owners as well as bloggers constructed smart blog posts
as you could, the net might be a lot more informative than it is now.
Appreciate it!!
My web page - erection pills

Anonymous said...

very good!

Anonymous said...

very good!

Anonymous said...

When some one searches for his essential thing, thus
he/she desires to be available that in detail, therefore that thing is maintained over
here.

Feel free to surf to my page ... womens victorinox swiss army

Anonymous said...

clare wille heartbeat dating http://loveepicentre.com andrea newton dating sites
dating and how slow is slow [url=http://loveepicentre.com/map/]i love you dating site ireland[/url] speed dating online paris
love dating sims [url=http://loveepicentre.com/articles/]fish dating waterloo ontario[/url] japanese older dating [url=http://loveepicentre.com/user/libranboy29/]libranboy29[/url] half life radioactive fossil dating

Anonymous said...

Wonderful goods from you, man. I've understand your stuff previous to and you are just too fantastic. I really like what you've acquired here,
really like what you are stating and the way in which you say it.
You make it entertaining and you still care for to keep it smart.
I can not wait to read far more from you. This is
actually a wonderful site.

Stop by my web blog; air jordan heels

Anonymous said...

It is truly a nice and helpful piece of information. I'm satisfied that you simply shared this useful information with us. Please keep us informed like this. Thank you for sharing.

Visit my web-site webpage ()

sotejed said...

click here to find out more s9f35x3p94 replica louis vuitton handbags replica bags wholesale replica bags in uk fake gucci x4u45h7j85 replica bags vuitton 7a replica bags philippines replica hermes bags m0z96y8e77 replica bags paypal accepted

Anonymous said...

yeezy
cheap jordan shoes
fear of god hoodie
off white
yeezy gap hoodie
yeezys
nike travis scott
kyrie irving shoes
jordan outlet
a bathing ape