locked
LaunchUriAsync and Desktop IE RRS feed

  • Question

  • Is it possible to open the desktop IE browser from a Windows 8 Metro application? We are currently using LaunchURIAsync but by default, it always opens the URI in the Metro IE browser. Is there a way to force the application to open the Desktop IE version instead of the Metro IE version?

    LaunchUriAsyn

    Monday, November 26, 2012 4:58 PM

Answers

  • no this is not possible, the default app is getting launced. This is something the end user controlls

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Monday, November 26, 2012 5:20 PM
  • As Dave says, the app doesn't have any control over this.

    The app launches a URI and it is handled by the default handler for that URI however that handler deals with the URI.

    In your test case, the "desktopie" link loads in iexplore.exe, which is a desktop browser app (see Developing a new experience enabled Desktop Browser for more details). If the user has chosen IE as their default browser then IE may choose to display in the new experience rather than in the desktop experience, depending on the user's IE settings. Since FireFox is not the default browser it can only load in the desktop experience. If the user changes the preferences so that FireFox is the default browser then IE will load only in the desktop experience and FireFox may display in the new experience.

    There is nothing that can be done from the app's side to affect this.

    --Rob

    Monday, November 26, 2012 9:47 PM
    Moderator

All replies

  • no this is not possible, the default app is getting launced. This is something the end user controlls

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Monday, November 26, 2012 5:20 PM
  • Thanks for the response.  We are able to open other desktop applications from a Metro application using LaunchURIAsync, so why can't the desktop IE browser be opened?

    Monday, November 26, 2012 6:08 PM
  • you are able becuase that are the default apps for custom protocols. If the end user makes the desktop IE the default program for http the desktop version will open

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, November 26, 2012 6:33 PM
  • I'm not sure I understand...

    As a test, we downloaded and installed Firefox on our Windows 8 development machine. We then created two custom protocol entries. One for the IE desktop and one for Firefox. Here are the following .reg file entries:

    [HKEY_CLASSES_ROOT\firefoxtest]
    @="URL:firefoxtest"
    "URL Protocol"=""

    [HKEY_CLASSES_ROOT\firefoxtest\shell]

    [HKEY_CLASSES_ROOT\firefoxtest\shell\open]

    [HKEY_CLASSES_ROOT\firefoxtest\shell\open\command]
    @="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\""

    [HKEY_CLASSES_ROOT\desktopie]
    @="URL:desktopie"
    "URL Protocol"=""

    [HKEY_CLASSES_ROOT\desktopie\shell]

    [HKEY_CLASSES_ROOT\desktopie\shell\open]

    [HKEY_CLASSES_ROOT\desktopie\shell\open\command]
    @="\"C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe\""

    As a result of the above entries, we now have two custom protocol entries in the registry. One named "firefoxtest" and one named "desktopie". The Win 8 Metro app call to "firefoxtest" is successful but the call to "desktopie" is unsuccessful.

    Can you please explain why Firefox will open but the desktop IE will not?

    Monday, November 26, 2012 8:45 PM
  • As Dave says, the app doesn't have any control over this.

    The app launches a URI and it is handled by the default handler for that URI however that handler deals with the URI.

    In your test case, the "desktopie" link loads in iexplore.exe, which is a desktop browser app (see Developing a new experience enabled Desktop Browser for more details). If the user has chosen IE as their default browser then IE may choose to display in the new experience rather than in the desktop experience, depending on the user's IE settings. Since FireFox is not the default browser it can only load in the desktop experience. If the user changes the preferences so that FireFox is the default browser then IE will load only in the desktop experience and FireFox may display in the new experience.

    There is nothing that can be done from the app's side to affect this.

    --Rob

    Monday, November 26, 2012 9:47 PM
    Moderator