gpt4 book ai didi

windows - NullSoft/NSIS 使用 Adob​​e 11 启动 PDF 不工作

转载 作者:可可西里 更新时间:2023-11-01 10:46:56 25 4
gpt4 key购买 nike

我有一个 NSIS 脚本,它具有显示自述文件功能,可以使用以下行在所有操作系统中成功启动 pdf:

ExecShell "open" "$0\$(APP_DATA_PATH)\AppData\Readme\readme_$(LOCAL_CODE).pdf"

但是 - 不在 Windows 8 中。如果 Adob​​e 以外的任何其他阅读器是默认阅读器,它似乎没问题。我们必须支持 Adob​​e,在 Windows 8 的其他地方启动 pdf 文件似乎没有任何问题。

是否有任何其他 NSIS 命令我可以尝试启动我可以尝试的文件?还有其他建议吗?

最佳答案

尝试使用默认动词:ExecShell """c:\full\path\to\file.pdf"

编辑:

Section

StrCpy $0 "$desktop\test.pdf"

; This should be the same as using ExecShell
System::Call 'shell32::ShellExecute(i$hwndparent,i0,t"$0",i0,i0,i5)i.r1'
DetailPrint "ShellExecute: Return=$1 (> 32 for success)"

; Let's try really hard by using SEE_MASK_INVOKEIDLIST
!define SEE_MASK_INVOKEIDLIST 0x0000000C
!define SEE_MASK_FLAG_DDEWAIT 0x00000100
System::Call '*(i60,i${SEE_MASK_INVOKEIDLIST}|${SEE_MASK_FLAG_DDEWAIT},i$hwndparent,i0,t"$0",i0,i0,i5,i,i0,i,i,i,i,i)i.r2' ; Allocate SHELLEXECUTEINFO
System::Call 'shell32::ShellExecuteEx(ir2)i.r1'
System::Free $2
DetailPrint "ShellExecuteEx: Success=$1"

SectionEnd

关于windows - NullSoft/NSIS 使用 Adob​​e 11 启动 PDF 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20478366/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com