嘗試使用默認的動詞: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
嘗試這樣做,同樣的問題。 我也試過:ExecShell打開「」(其中open不在引號中)。一樣。是否有一個等效的nsis cmd來啓動文件?我正在用nsis版本2.46進行構建。 有什麼建議嗎?感謝幫助的人:) –
Forrie
ExecShell只是ShellExecute的一個薄包裝。我會寫一些代碼,在今晚晚些時候直接爲你調用ShellExecute ... – Anders
乾杯實際上,我發現如果我在Acrobat Reader中禁用「在啓動時啓用保護模式」,它工作正常。它只適用於此啓用?如果我雙擊PDF =也許它是許可的事情,它可以正常工作嗎? – Forrie