using process.start to open a web page

Discussion in 'Microsoft VB .NET' started by bill, Jul 5, 2008.

  1. bill

    bill Guest

    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
     
    bill, Jul 5, 2008
    #1
    1. Advertisements

  2. On Jul 5, 10:07 pm, bill <> wrote:
    > 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
     
    kimiraikkonen, Jul 5, 2008
    #2
    1. Advertisements

  3. bill

    bill Guest

    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 <> wrote:
    > > 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, Jul 5, 2008
    #3
  4. On Jul 5, 11:58 pm, bill <> wrote:
    > 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 <> wrote:
    > > > 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
     
    kimiraikkonen, Jul 5, 2008
    #4
  5. bill

    bill Guest

    I'm using Vista (should have mentioned that); maybe that's the problem
    Thanks

    --
    bill


    "kimiraikkonen" wrote:

    > On Jul 5, 11:58 pm, bill <> wrote:
    > > 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 <> wrote:
    > > > > 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
    >
     
    bill, Jul 5, 2008
    #5
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    4
    Views:
    260
    Guest
    Nov 23, 2003
  2. Replies:
    3
    Views:
    453
  3. Cerebrus99

    Open then Close Explorer directory using Process.Start

    Cerebrus99, Feb 15, 2006, in forum: Microsoft VB .NET
    Replies:
    1
    Views:
    220
    Mike Kober
    Feb 16, 2006
  4. Replies:
    0
    Views:
    340
  5. Ronald S. Cook

    Dim p As Process = New Process() vs Dim p as New Process()

    Ronald S. Cook, Apr 11, 2007, in forum: Microsoft VB .NET
    Replies:
    6
    Views:
    784
    rowe_newsgroups
    Apr 12, 2007
Loading...

Share This Page