Answered by:

Can you programmatically launch a Metro Style Application?

Question

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?

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.

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?

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).

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

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 07, 2011 8:14 PM

Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.