locked
WinRT: Open link in internet explorer no matter the default browser

    Question

  • Hello,

    I'm using WinRT to build a library for W8 pc and tablets. Is there any way to force a link to be open using Internet Explorer ? (I do prefer some other browser but they doesn't handle facebook url callback well on windows phone)

    Currently I’m using that code:

                auto uri = ref new Windows::Foundation::Uri(str);
                auto launchOptions = ref new Windows::System::LauncherOptions();
    
                launchOptions->DisplayApplicationPicker = true;
    
                Windows::System::Launcher::LaunchUriAsync(uri, launchOptions);
    

    It does display a picker to let the user choose either ie or another installed browser, but it doesn’t force ie. I also tried:

    auto uri = ref new Windows::Foundation::Uri(str); auto launchOptions = ref new Windows::System::LauncherOptions();

                launchOptions->PreferredApplicationDisplayName = "Internet Explorer";
    
                Windows::System::Launcher::LaunchUriAsync(uri, launchOptions);
    

    But it complain about PreferredApplicationPackageFamilyName not being set. And I’m unable to find the PFN of internet explorer in any documentation nor after googling.

    Does anyone has the same issue ?? I can't use any c#, only winrt C++ api. I already found the solution using c# but sadly it's incompatibl with the project I'm working on ...

    Thx for your help,

    Damien

    Wednesday, October 30, 2013 3:38 PM

Answers