Inno Setup:如何启动Adobe Reader和显示PDF [英] Inno Setup: How to launch Adobe Reader and display a PDF

查看:230
本文介绍了Inno Setup:如何启动Adobe Reader和显示PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在安装结束时启动Adobe Reader以显示自述文件.我正在使用PDF,因为我需要显示一些图像.我的inno安装脚本失败,显示无法执行文件:创建进程失败;代码267,目录名称无效."

I am trying to launch Adobe Reader at the end of the install to display a readme file. I am using PDF because I need to display some images. My inno setup script is failing with "Unable to execute file: Create Process failed; code 267, the directory name is invalid."

我试过在文件名前后使用带引号和不带引号:路径中有空格,但是,阅读文档时,inno会注意带空格的路径(是正确的吗?).

I have tried with and without quote around Filename: The path has spaces, however, reading the documentation, inno will take care of path with spaces (is that correct?).

顺便说一句-已安装Adobe(或者用户必须先安装它,然后再安装应用程序).就我而言,它已经安装.

BTW - Adobe is installed (or the user has to install it before installing the application) In my case it is already installed.

我正在使用的代码片段:

The code snipet that I am using:

[Tasks]
Name: StartAfterInstall; Description: Display the PDF Readme File

[Run]
Filename: "{reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe,@AcroRd32.exe} {app}\readme.pdf"; Tasks: StartAfterInstall

推荐答案

最好在用户的默认PDF查看器中打开PDF文件.这就是您指定 shellexec 在PDF文件的 [Run] 部分条目中标记.此标志将使您的文件由Windows Shell打开,该Windows Shell将使用为PDF扩展名注册的应用程序:

Prefer opening your PDF file in the user's default PDF viewer. That's what you can do when you specify the shellexec flag in the [Run] section entry for your PDF file. This flag will let your file be opened by the Windows Shell which will use the application registered for the PDF extension:

[Tasks]
Name: StartAfterInstall; Description: Display the PDF Readme File

[Run]
Filename: "{app}\readme.pdf"; Tasks: StartAfterInstall; Flags: shellexec runasoriginaluser

这篇关于Inno Setup:如何启动Adobe Reader和显示PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆