locked
How to launch a exe file within Metro application?

    Question

  • Windows::System::Launcher::LaunchFileAsync can launch .txt .jpg etc.  But launch .lnk and .exe failed!

    How to launch a exe file within Metro application?

    Thanks.

    Thursday, June 14, 2012 7:41 AM

Answers

  • Hi Ejun818,

    Metro style apps cannot directly launch other applications. This is discussed in the documentation for LaunchFileAsync:

    You cannot use this method to launch file types which 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.
    --Rob
    • Marked as answer by Jesse Jiang Monday, June 18, 2012 11:21 AM
    Thursday, June 14, 2012 12:12 PM
    Owner