Launch another app from metro style app

In Windows(phone) 8 you cannot run other external apps just like that. As seen in Windows 8, Microsoft is moving away from allowing an application to start any other application.  The recommended method of starting another process and that’s to use the File Asssociations. There is some old similar example and a new one.

On the desktop side this

Process p = new Process();
    p.StartInfo.UseShellExecute = false;
    p.StartInfo.FileName = "C:\SomeApp.exe";

or this

   ProcessStartInfo startInfo = new ProcessStartInfo("C:\SomeApp.exe");
    startInfo.Arguments = "123";

would work fine but for Windows 8 we have to use Windows.System.Launcher class.

Basically you will need to “launch” a file or an uri then you will have the option to choose how it will be run if not configured yet.

  var someFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(@"Assets\somedata.xml";); 
  bool success = await Windows.System.Launcher.LaunchFileAsync(someFile);