none
diagnostics.process.start cannot open IE browser window RRS feed

  • Question

  • I have been using diagnostics.process.start with a URI as the only argument for several years to open an IE 7 browser window to a web page from my Windows Forms application.

    When I published my last release of my software this stopped working. Now it will only open a tab in an existing IE browser window or it will open a new window to any default browser other than IE. If no browser is open and IE is set to be the default an exception "The system cannot find the file specified" is thrown.

    Does anyone know what might have changed to cause this; an IE patch or something?

    Thank you
    Thursday, January 21, 2010 7:04 PM

Answers

All replies

  • Don't force the application to use IE. let windows decide how to explore it like following:
    Process.Start("explorer","http://msdn.microsoft.com/");

    "Sweet are the uses of adversity,
     Which like the toad, ugly and venomous,
     Wears yet a precious jewel in his head;
     And this our life, exempt from public haunt,
     Finds tongues in trees,
     Books in the running brooks,
     Sermons in stones, and good in everything" - William Shakespeare

    Thursday, January 21, 2010 7:31 PM
  • Thank you for the reply Yasser.

    Actually I'm not trying to force a particular browser at all; I'm using
    Process.Start("http://msdn.microsoft.com")

    If Firefox or Chrome is my default browser it works like a dream. If IE is my default browser I get the exception "The system cannot find the file specified". Unfortunately my target audience (internal users) have standardized on IE.

    Now again, if there is already an open IE window when this call is made a new tab is opened and the page is displayed fine. It just won't open a new IE window since my last release.

    Thanks again.
    Thursday, January 21, 2010 7:48 PM
  • What do you do if telling IE to check if it is the defualt browser doesn't work?  This requires modifying the registry. Only use this method if you have already tried to set Internet Explorer as your default browser using its option to do so.

    Open the registry using regedit. In your registry, change:

    /HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/Main/Check_Associations

    to read "YES"

    The next time you start Internet Explorer, it will ask if you would like to make it the default. Answer Yes to that prompt and it will now retain default browser status.

    Reference: http://support.teloep.org/defie.htm


    "Sweet are the uses of adversity,
     Which like the toad, ugly and venomous,
     Wears yet a precious jewel in his head;
     And this our life, exempt from public haunt,
     Finds tongues in trees,
     Books in the running brooks,
     Sermons in stones, and good in everything" - William Shakespeare

    Thursday, January 21, 2010 7:57 PM
  • The answer that solved my problem is from this other post I made and temporarily lost track of...
    http://social.msdn.microsoft.com/Forums/en-US/clr/thread/aabf8fa9-449b-4f60-9d70-025780504917?prof=required&ppud=4
    • Marked as answer by EduCoder1 Friday, January 22, 2010 3:39 PM
    Friday, January 22, 2010 3:39 PM