3

我有一个需要使用脚本启动的 Windows RT 应用程序。我已经使用 PowerShell 在设备上安装了该应用程序,但我需要使用 PowerShell 或命令提示符启动该应用程序。有没有办法做到这一点?谢谢。

PS 看起来有一种方法可以使用 Start-MetroApp 命令在 Windows 8 上启动 Metro 应用程序,但这在 Windows RT 上不起作用。Windows RT 是否有某种等价物?

4

2 回答 2

3

你可以使用协议激活,如果你想让你的应用程序让任何人都可以从资源管理器、运行、powershell 或 cmd 打开它

这是协议激活的 MSDN 示例。

这是启动应用程序的方法。

对于运行和资源管理器:myapp://

对于 cmd 和 power shell :explorer.exe myapp://

此外,阅读这篇很棒的博文,Inter-Process communication (Windows Store App & Desktop Apps) with protocol association in WinRT

于 2013-04-18T09:20:59.190 回答
0

我会看看Launch Windows 8 Metro Apps From a Desktop Shortcut or Command Line中提到的技术,例如:

explorer.exe bingnews://

它还提到了一个MetroLauncher实用程序,该实用程序适用于没有协议的应用程序。

于 2013-04-16T23:53:38.907 回答