I'm running PowerPoint Presentations from my desktop app, which is written in the electron (node.js). I use child_process to run powerpnt.exe with params, and it works fine. I'm looking for similar solution for workstations, where only PowerPoint Viewer is installed. On some machines, pptview.exe was working fine, but this not always works, I need a reliable solution. I tried to find out the full PowerPoint Viewer path in Windows registry, but I'm not sure where should I look for. Maybe someone knows the reliable way to run pptx file from nodejs in PowerPoint Viewer?
我正在从我的桌面应用程序运行PowerPoint演示文稿,这是用电子(node.js)编写的。我用child_process用params运行powerpnt.exe,它工作正常。我正在为工作站寻找类似的解决方案,其中只安装了PowerPoint Viewer。在某些机器上,pptview.exe工作正常,但这并不总是有效,我需要一个可靠的解决方案。我试图找到Windows注册表中的完整PowerPoint Viewer路径,但我不确定我应该在哪里寻找。也许有人知道从PowerPoint Viewer中的nodejs运行pptx文件的可靠方法?
1 个解决方案
#1
1
The default location for PowerPoint viewer is:
PowerPoint查看器的默认位置是:
-
32 bit Windows 7: C:\Program Files\Microsoft Office\Office12\pptview.exe
32位Windows 7:C:\ Program Files \ Microsoft Office \ Office12 \ pptview.exe
-
64 bit Windows 7: C:\Program Files(x86)\Microsoft Office\Office12\pptview.exe
64位Windows 7:C:\ Program Files(x86)\ Microsoft Office \ Office12 \ pptview.exe
I would start by checking if those files exists. If not you could check the registry. HKEY_CLASSES_ROOT
in the registry holds information on which application should open which file. You should find something like HKEY_CLASSES_ROOT\.pptx\
.
我首先检查这些文件是否存在。如果没有,你可以检查注册表。注册表中的HKEY_CLASSES_ROOT保存有关哪个应用程序应打开哪个文件的信息。你应该找到类似HKEY_CLASSES_ROOT \ .pptx \的东西。
If all else fails you could try to do a silent installation of PowerPoint viewer in the background. Download the installation file in the background and run it with PowerPointViewer.exe /quiet /passive /norestart
. More info here.
如果所有其他方法都失败了,您可以尝试在后台静默安装PowerPoint查看器。在后台下载安装文件,并使用PowerPointViewer.exe / quiet / passive / norestart运行它。更多信息在这里。
#1
1
The default location for PowerPoint viewer is:
PowerPoint查看器的默认位置是:
-
32 bit Windows 7: C:\Program Files\Microsoft Office\Office12\pptview.exe
32位Windows 7:C:\ Program Files \ Microsoft Office \ Office12 \ pptview.exe
-
64 bit Windows 7: C:\Program Files(x86)\Microsoft Office\Office12\pptview.exe
64位Windows 7:C:\ Program Files(x86)\ Microsoft Office \ Office12 \ pptview.exe
I would start by checking if those files exists. If not you could check the registry. HKEY_CLASSES_ROOT
in the registry holds information on which application should open which file. You should find something like HKEY_CLASSES_ROOT\.pptx\
.
我首先检查这些文件是否存在。如果没有,你可以检查注册表。注册表中的HKEY_CLASSES_ROOT保存有关哪个应用程序应打开哪个文件的信息。你应该找到类似HKEY_CLASSES_ROOT \ .pptx \的东西。
If all else fails you could try to do a silent installation of PowerPoint viewer in the background. Download the installation file in the background and run it with PowerPointViewer.exe /quiet /passive /norestart
. More info here.
如果所有其他方法都失败了,您可以尝试在后台静默安装PowerPoint查看器。在后台下载安装文件,并使用PowerPointViewer.exe / quiet / passive / norestart运行它。更多信息在这里。