Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted
   Private Sub btnLaunch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLaunch.Click

            System.Diagnostics.Process.Start("iexplore.exe", "http://www.google.com")
      

   End Sub

--tim
  • Leaders
Posted
Then you'd do the same thing. The argument that iexplore.exe accepts it a URL which doesn't have to use http. Just provide the file path and it should work.
--tim
  • *Experts*
Posted

Just use the Start method with on param, as in:

System.Diagnostics.Process.Start("http://www.google.com")
System.Diagnostics.Process.Start("c:\test.bat")

 

(You might need to double up on the backslashes, can't remember if VB needs that or just C#).

 

In the first line, the command will open Google in whatever the default browser is. This is preferred over using the name "iexplore.exe" in case that name changes or in case the user just hates IE and loves netscape.

 

The second line just executes the file - can be EXE, COM, VBS, WSH, BAT, etc. - they're all considered executables, in a fashion.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...