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:

Senthil said...

Nice work. Go to see the basic operation in vb.net...

Anonymous said...

Fantastic.... great code.

uiyui said...

Catch the wow gold star that holds your gold in wow destiny,cheap wow gold the one that forever maplestory money twinkles within your heart. Take advantage of precious opportunities while they still sparkle before you. Always believe that your buy maplestory mesos ultimate goal is attainable cheap mesos as long as you commit yourself to it.maple money Though barriers may sometimes stand in the way of your dreams, remember that your destiny is hiding behind them.wow gold kaufen Accept the fact that not everyone is going to approve of the choices Maple Story Accounts you've made. Have faith in your judgment.wow gold farmen Catch the star that maple story money twinkles in your heart and it will lead you to your destiny's path. Follow that pathway and uncover the sweet sunrises that await you. Take pride in your accomplishments, as they are stepping stones to your dreams. Understand that you may make mistakes, powerlevelbut don't let them discourage you.ms mesos Value your capabilities and talents for they are what make you truly unique. The greatest gifts in life are not purchased, but acquired through hard work and determination.maplestory mesos Find the star that twinkles in your heart?for you alone maplestory powerleveling are capable of making your brightest dreams come true. Give your hopes everything you've got and you will catch the star that holds your destiny.

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.

KRISHNAKANT said...

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

KRISHNAKANT said...

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

KRISHNAKANT 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 ()