Process.Start("iexplore.exe") Not Working in Windows 2000

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

I have an (VB.NET) application that utilizes a webbrowser control for
displaying certain information to the user. A webbrowser control is
found on two separate forms. On a third form I allow the user to link
to my company's web site through a link label. When the user clicks
the link label, I do something like:

Dim p As Process = New Process
p.StartInfo.FileName = GetDefaultBrowser() 'Gets the default browser
from the registry
p.StartInfo.Arguments = "http://www.mywebpage.com/"
p.Start()

On windows XP machines this code works great. On windows 2000
machines the Internet Explorer fails to launch--and crashes with an
error: "The application failed to initialize properly
(0xc000007b)....."

If my default browser is something else, the code also launches the
appropriate browser correctly. Without the webbrowser control in the
application the code works properly. Both instances of the webbrowser
control have the "Register as Browser" properties set to false--and
the error occurs even when the forms are never instantiated.

Thanks,
Justin
 
Not sure which platforms this works on (I know it works on XP) but you can
just use

System.Diagnostics.Process.Start("http://somewebpage")

This is how I open up help pages from within my apps.

- Jason
 
I appreciate the response. Unfortunately, I have already tried that
method. It works great in all platforms until you host the webbrowser
control in your application also.

I also attempted to get IE to launch by calling another console
application from my browser control host application--I let the
console application handle the process.start call to IE. IE
encounters the same error.

Any more thoughts would be helpful! Thanks
 
Hi Guys,

I get the same error in Windows 2000. I would eventually like to use the
process.start("iexplore.exe") way of calling up internet explorer, but I have
struggled to come up with a work-around. If you are interested, do the
following:

(This works for VB.NET btw)

1. Add a reference to your project (found in the COM tab when you call up
the add reference dialog box): Microsoft Internet Controls
2. Next use a version of this code this is suitable for your application:

Dim ie As New SHDocVw.InternetExplorer

Try
ie.Navigate("www.whateveryourlinkis.com")
ie.Visible = True
Catch
MsgBox("Cannot find specified file!")
End Try

This seems to work good. Calls up Internet Explorer for you and and it does
not bomb when running under Windows 2000. I hope you find this useful and if
someone from Microsoft reads this post, any input would be appreciated!
 
Back
Top