locked
Can you programmatically launch a Metro Style Application?

    Question

  • Hi,

    I like how application contracts can share information between apps. In a similar vein, can one Metro Style Application launch another? For example, if my app displays a tweet, can I launch Twitterama directly from my code (some sort of shellExecute) or even from a link?

    Thursday, September 22, 2011 7:31 PM

Answers

  • Hi Joe,

    No.  Only user initiated action such as clicking on the tile or invoking through share or search will launch a Metro style app.

    Jeff


    Jeff Sanders (MSFT)
    Thursday, September 22, 2011 7:43 PM
    Moderator

All replies

  • Hi Joe,

    No.  Only user initiated action such as clicking on the tile or invoking through share or search will launch a Metro style app.

    Jeff


    Jeff Sanders (MSFT)
    Thursday, September 22, 2011 7:43 PM
    Moderator
  • In addition to jpsanders, I think (but I'm not sure) that you can't launch them trough another application due to the sandboxed state in which metro UI applications run.

    Regards,

    Dylan Meeus


    0x2B |~ 0x2B Blog : www.it-ca.net/blogdylan
    Friday, September 23, 2011 12:18 AM
  • To expand on that question, is the other way round possible?

    Can we start a desktop application from a metro app?

    After all, the control panel app can do it.  So can IE10.

    Friday, September 23, 2011 9:44 PM
  • Aroush - no, desktop applications cannot be started from metro apps, also due to the sandboxed state in which metro UI applications run. The control panel app is a very special case that isn't really the same as normal metro apps, and the immersive browser is a browser app which also has it's own special set of rules.
    Monday, September 26, 2011 7:59 PM
  • actually you can. there is a sample in the VS sample set called "Association Launching Sample" that creates an image, saves it, and launches the desktop app to edit it. this is done through association. So your desktop app could become the handler for a file type and the metro app could create a file that would then launch the desktop app with the file loaded. this would allow a certain amount of interaction. I wonder if it would work the other way (desktop to metro) although i do not know if the handler concept exists in the metro layer?
    Tuesday, September 27, 2011 4:24 PM
  • Ok.

    Allow me to highlight again how this is yet another example of the fact that metro and desktop really are 2 systems running side by side with no integration whatsoever.  Which would be fine, if it wasn't for the fact that microsoft insists on crippling the desktop by redirecting the user to full-screen metro stuff every other click.

    There really is no consistency here.  It's duct tape.


    (sorry if this feels like 'shooting the messenger' which is not how I mean this).
    Tuesday, September 27, 2011 10:10 PM
  • Hi Aroush,

    Don't worry about 'shooting the messenger', we appreciate your feedback!

    -Jeff


    Jeff Sanders (MSFT)
    Wednesday, September 28, 2011 1:00 PM
    Moderator
  • And I appreciate that you appreciate my feedback.  :-)

    Really.

    The fact that I (and others here) are passionate enough to express our concerns here at length actually is a testament to how much we love windows.  I couldn't care less if 'certain other companies' do something I don't agree with for example, lol.  You know who I mean.  :P

     

    Wednesday, September 28, 2011 2:06 PM
  • Specifically, if you have an app with an association by the file extension, you can launch the editing app by calling
    Windows.System.Launcher.LaunchDefaultProgramForFile(MyPicturePathUri);
    I did see there is a LaunchDefaultProgram, but calling LaunchDefaultProgram(@"C:\windows\notepad.exe") rasies an unauthorized exception.
    http://www.ThinqLinq.com http://www.LinqInAction.net - "LINQ In Action", The book is now available. Don't wait for the movie
    Friday, October 7, 2011 8:14 PM