【发布时间】:2020-01-30 16:46:22
【问题描述】:
我正在使用以下代码从我的 uwp 应用程序启动一个 powerpoint 文件:
Windows.System.Launcher.LaunchFileAsync("MyPath\powerpointFile.ppt");
这绝对没问题。
我现在想为这个方法提供一些命令行参数,但是看着documentation,我看不到任何命令行参数的提及。
是否可以在 uwp 应用程序中使用 Launcher 打开文件并将命令行参数传递给它
我的桌面应用程序当前打开 powerpoint 文件如下:
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "POWERPNT.exe";
startInfo.Arguments = "/S " + "\"" + fileName + "\"";
var process = Process.Start(startInfo);
【问题讨论】:
-
您想使用哪些命令行参数?您可以尝试将Office URI scheme 传递给LaunchUriAsync 方法。
-
我希望在
kiosk模式下启动 powerpoint - 或在桌面上使用 /s 参数