【问题标题】:Running PowerPoint Viewer from commandline on Windows在 Windows 上从命令行运行 PowerPoint Viewer
【发布时间】:2018-03-13 20:21:43
【问题描述】:

我正在从我的桌面应用程序运行 PowerPoint 演示文稿,该应用程序是用电子 (node.js) 编写的。我使用 child_process 来运行带有参数的 powerpnt.exe,它工作正常。我正在为仅安装 PowerPoint Viewer 的工作站寻找类似的解决方案。在某些机器上,pptview.exe 工作正常,但这并不总是有效,我需要一个可靠的解决方案。我试图在 Windows 注册表中找到完整的 PowerPoint Viewer 路径,但我不确定我应该在哪里寻找。也许有人知道在 PowerPoint Viewer 中从 nodejs 运行 pptx 文件的可靠方法?

【问题讨论】:

    标签: node.js windows registry electron powerpoint


    【解决方案1】:

    PowerPoint 查看器的默认位置是:

    • 32 位 Windows 7:C:\Program Files\Microsoft Office\Office12\pptview.exe

    • 64 位 Windows 7:C:\Program Files(x86)\Microsoft Office\Office12\pptview.exe

    我会首先检查这些文件是否存在。如果没有,您可以检查注册表。注册表中的HKEY_CLASSES_ROOT 包含有关哪个应用程序应该打开哪个文件的信息。您应该找到类似HKEY_CLASSES_ROOT\.pptx\ 的内容。

    如果一切都失败了,您可以尝试在后台静默安装 PowerPoint 查看器。后台下载安装文件,使用PowerPointViewer.exe /quiet /passive /norestart运行。更多信息here

    【讨论】:

    • /Office12/ 是不变的还是可以改变的?我已经检测到是否安装了 PPT 查看器,但我找不到任何路径。
    猜你喜欢
    • 2018-04-07
    • 2013-09-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-31
    • 2016-08-13
    • 1970-01-01
    • 2010-10-25
    相关资源
    最近更新 更多