How to download and allow the user to execute msi/exe from website from Metro app RRS feed

  • Question

  • I have a Xaml/C# app. Can I click on a button to allow the user to

    a) download and execute a msi from a website.


    a) Launch a command bar charm with Run, and Cancel buttons

             i) if they click Run it executes the msi (since it is a Windows installer, it will do to the non-metro desktop and run the msi

    If you use Metro IE to navigate to a website and click a download link, it issues a command charm and allows you to perform these actions. I notice LaunchFileAsync cannot work for msi, exe or files that don't open within a container app. How can I get this to work--like Metro IE....Thanks.

    Friday, May 18, 2012 8:48 PM


  • No, there is no way for a Metro style app to launch another application directly.

    See the comments you pointed at in the Launcher.LaunchFileAsync documentation for an explanation of why:

    You cannot use this method to launch file types that contain code or script if they are executed automatically by the system, such as .exe, .msi, and .js files. This restriction protects users from potentially malicious files that could modify the system. You can use this method to launch file types that can contain script if they are executed by an application that isolates the script, such as .docx files. Applications like Word keep the script in .docx files from modifying the system

    IE is using features reserved for the user's chosen browser. These are not available to general purpose apps.


    • Marked as answer by Min ZhuMember Wednesday, May 30, 2012 1:30 AM
    Friday, May 18, 2012 8:55 PM