473,387 Members | 1,678 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.

using process.start to open a web page

i'm using VS2005, VB.NET windows forms application
when I try to open a web page using process.start, i get an error:
"application not found"

I'm using this syntax:

System.Diagnostics.Process.Start("http://www.microsoft.com/")

It works if I do it like this (thank you HKW), but what if the user doesn't
use IE, but uses some other browser?

Dim psi As New ProcessStartInfo()
With psi
.FileName = "iexplore"
.Arguments = "-new http://dotnet.mvps.org/"
End With
Process.Start(psi)
Thanks
Bill
--
bill
Jul 5 '08 #1
4 8435
On Jul 5, 10:07 pm, bill <bel...@hotmail.comwrote:
i'm using VS2005, VB.NET windows forms application
when I try to open a web page using process.start, i get an error:
"application not found"

I'm using this syntax:

System.Diagnostics.Process.Start("http://www.microsoft.com/")

It works if I do it like this (thank you HKW), but what if the user doesn't
use IE, but uses some other browser?

Dim psi As New ProcessStartInfo()
With psi
.FileName = "iexplore"
.Arguments = "-newhttp://dotnet.mvps.org/"
End With
Process.Start(psi)

Thanks
Bill
--
bill
For instance, I changed default browser to Firefox from IE and the
syntax

System.Diagnostics.Process.Start("http://www.microsoft.com/")

worked well.(It was opened in IE when IE was default, it was opened in
Firefox when Firefox was default).

What's the exact problem?

or do you want your users to open link in Firefox explictly:
System.Diagnostics.Process.Start( _
"C:\Program Files\Mozilla Firefox\firefox.exe", _
"http://www.microsoft.com")

Hope this helps,

Onur Güzel
Jul 5 '08 #2
Kimi -

I saw that Heikki and Mark stole the front row from you today at Silverstone
- good luck tomorrow, though.

when I use
System.Diagnostics.Process.Start("http://www.microsoft.com/")

I get an error:

"application not found"

--
bill
"kimiraikkonen" wrote:
On Jul 5, 10:07 pm, bill <bel...@hotmail.comwrote:
i'm using VS2005, VB.NET windows forms application
when I try to open a web page using process.start, i get an error:
"application not found"

I'm using this syntax:

System.Diagnostics.Process.Start("http://www.microsoft.com/")

It works if I do it like this (thank you HKW), but what if the user doesn't
use IE, but uses some other browser?

Dim psi As New ProcessStartInfo()
With psi
.FileName = "iexplore"
.Arguments = "-newhttp://dotnet.mvps.org/"
End With
Process.Start(psi)

Thanks
Bill
--
bill

For instance, I changed default browser to Firefox from IE and the
syntax

System.Diagnostics.Process.Start("http://www.microsoft.com/")

worked well.(It was opened in IE when IE was default, it was opened in
Firefox when Firefox was default).

What's the exact problem?

or do you want your users to open link in Firefox explictly:
System.Diagnostics.Process.Start( _
"C:\Program Files\Mozilla Firefox\firefox.exe", _
"http://www.microsoft.com")

Hope this helps,

Onur Güzel
Jul 5 '08 #3
On Jul 5, 11:58 pm, bill <bel...@hotmail.comwrote:
Kimi -

I saw that Heikki and Mark stole the front row from you today at Silverstone
- good luck tomorrow, though.

when I use
System.Diagnostics.Process.Start("http://www.microsoft.com/")

I get an error:

"application not found"

--
bill

"kimiraikkonen" wrote:
On Jul 5, 10:07 pm, bill <bel...@hotmail.comwrote:
i'm using VS2005, VB.NET windows forms application
when I try to open a web page using process.start, i get an error:
"application not found"
I'm using this syntax:
System.Diagnostics.Process.Start("http://www.microsoft.com/")
It works if I do it like this (thank you HKW), but what if the user doesn't
use IE, but uses some other browser?
Dim psi As New ProcessStartInfo()
With psi
.FileName = "iexplore"
.Arguments = "-newhttp://dotnet.mvps.org/"
End With
Process.Start(psi)
Thanks
Bill
--
bill
For instance, I changed default browser to Firefox from IE and the
syntax
System.Diagnostics.Process.Start("http://www.microsoft.com/")
worked well.(It was opened in IE when IE was default, it was opened in
Firefox when Firefox was default).
What's the exact problem?
or do you want your users to open link in Firefox explictly:
System.Diagnostics.Process.Start( _
"C:\Program Files\Mozilla Firefox\firefox.exe", _
"http://www.microsoft.com")
Hope this helps,
Onur Güzel
Bill,
Though it's just my nickname, thanks for your goodwill :)

However, i can't reproduce the problem you mentioned on XP, anyway
would you also try this:

Shell("explorer.exe http://www.microsoft.com", _
AppWinStyle.NormalFocus)

Hope this helps,

Onur Güzel
Jul 5 '08 #4
I'm using Vista (should have mentioned that); maybe that's the problem
Thanks

--
bill
"kimiraikkonen" wrote:
On Jul 5, 11:58 pm, bill <bel...@hotmail.comwrote:
Kimi -

I saw that Heikki and Mark stole the front row from you today at Silverstone
- good luck tomorrow, though.

when I use
System.Diagnostics.Process.Start("http://www.microsoft.com/")

I get an error:

"application not found"

--
bill

"kimiraikkonen" wrote:
On Jul 5, 10:07 pm, bill <bel...@hotmail.comwrote:
i'm using VS2005, VB.NET windows forms application
when I try to open a web page using process.start, i get an error:
"application not found"
I'm using this syntax:
System.Diagnostics.Process.Start("http://www.microsoft.com/")
It works if I do it like this (thank you HKW), but what if the user doesn't
use IE, but uses some other browser?
Dim psi As New ProcessStartInfo()
With psi
.FileName = "iexplore"
.Arguments = "-newhttp://dotnet.mvps.org/"
End With
Process.Start(psi)
Thanks
Bill
--
bill
For instance, I changed default browser to Firefox from IE and the
syntax
System.Diagnostics.Process.Start("http://www.microsoft.com/")
worked well.(It was opened in IE when IE was default, it was opened in
Firefox when Firefox was default).
What's the exact problem?
or do you want your users to open link in Firefox explictly:
System.Diagnostics.Process.Start( _
"C:\Program Files\Mozilla Firefox\firefox.exe", _
"http://www.microsoft.com")
Hope this helps,
Onur Güzel

Bill,
Though it's just my nickname, thanks for your goodwill :)

However, i can't reproduce the problem you mentioned on XP, anyway
would you also try this:

Shell("explorer.exe http://www.microsoft.com", _
AppWinStyle.NormalFocus)

Hope this helps,

Onur Güzel
Jul 5 '08 #5

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

Similar topics

6
by: BCM | last post by:
In a simple console app the following few lines open up an Acrobat file without a hitch: Process p = new Process(); p.StartInfo.FileName = @"C:\test.pdf"; p.Start(); But the same code in an...
11
by: Johnny Lee | last post by:
Hi, I was using urllib to grab urls from web. here is the work flow of my program: 1. Get base url and max number of urls from user 2. Call filter to validate the base url 3. Read the source...
4
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times....
0
by: ALI-R | last post by:
I am using the code below to open Outlook as user clicks on "Email this page" try { string subjectEmail=string.Format("Magnet Alert Center - Alerts for : {0}",Request.QueryString);
6
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically,...
1
by: Screenbert | last post by:
After finding nothing anywhere in google I am posting this so everyone can benefit by it. The formating is not pretty since I copied it from my word document, but you should benefit by it. ...
0
by: screenbert | last post by:
Managing DHCP Servers using C# They said it was impossible. It couldn't be done. But you can in fact manage DHCP servers using C#. This includes creating and deleting Scopes, SuperScopes,...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
2
by: Iain Wilson | last post by:
Hi Mike I have changed the code using Server.MapPath but to no avail. Prints the Adobe PDF document to the default local printer (I am running this localhost). I Have not run it on the server...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.