INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

How-to

Launch the default Application for a File (Or Web Browser for Web Page) by ThatRickGuy
Posted: 9 Dec 04 (Edited 15 Sep 06)

It appears that this no longer works correctly in XP with SP2, if I find a way to make it work again I'll update the FAQ

Nice and simple, but very handy, expecially now that FireFox is out and more and more people are moving away from IE. This will open the default web browser:

CODE

System.Diagnostics.Process.Start("cmd /c ""start http://www.google.com""")

This is also great for standard windows files. Like Adobe Acrobat Reader and PDF files:

CODE

System.Diagnostics.Process.Start("cmd /c ""start " & FilePathAndName & """)

the Joy of the Start command is that it lets windows resolve the correct application to open the file with.
-Rick

Back to Visual Basic (Microsoft) VB.NET FAQ Index
Back to Visual Basic (Microsoft) VB.NET Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close