从另一个运行的metro应用程序启动一个已安装的metro应用程序

从另一个运行的metro应用程序启动一个已安装的metro应用程序

问题描述:

hii

我有一个地铁应用程序,我想从中导航或说启动另一个已经以编程方式安装在ma pc上的地铁应用程序。完成后我新推出的应用程序我也想回到正在运行的应用程序。

I have one metro app from which i want to navigate to or say launch another metro app which is already installed on ma pc programmatically.After i am done with newly launched app i also want to get back to running app.

我正在使用:

Windows.Storage.StorageFile file1 =等待Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(@" NewApp.exe"); 

Windows.Storage.StorageFile file1 = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(@"NewApp.exe"); 

等待Windows.System.Launcher.LaunchFileAsync(file1);

await Windows.System.Launcher.LaunchFileAsync(file1);

给我文件not Found例外。

which gives me file not Found exception .

这里是地铁应用程序我给.exe扩展名。它是正确的还是需要其他扩展名。

Here for metro app i am giving .exe extension. is it correct or other extension is required.

Plz帮助我..

谢谢你的支持

你不能这样做。 您无法直接启动应用程序。

You cannot do this.  You cannot launch applications directly.

您可以使用文件协议启动应用程序。 

You can launch apps using file protocols however. 

请参阅:
http://social.msdn。 microsoft.com/Search/en-US/windows/apps?query=file%20protocol&rq=meta:Search.MSForums.ForumID(0befe8a5-d7fb-40ee-882a-2a143bc73489)+site:microsoft.com&rn=Building + Metro + style + apps + with + HTML5%2fJavaScript + Forum

-Jeff