NullSoft/NSIS Launch PDF using Adobe 11 not working

I have an NSIS script that has a show readme function that launches a pdf successfully in all OS's using the following line:

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

BUT - not in Windows 8. If any other reader other than Adobe is the default reader, it seems to be ok. We have to support Adobe and there seems to be nothing wrong with launching the pdf file elsewhere in Windows 8.

Is there any other NSIS command I can try to launch the file that I can try? Any other suggestions?

Answers


Try using the default verb: ExecShell "" "c:\full\path\to\file.pdf"

Edit:

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

Need Your Help

Alloy constraint specification

logic alloy logic-programming

I wrote the following code block in Alloy:

Linux File Locking in Java

java linux file locking

I know we can lock a file in linux using flock(). However, NFS drive might not support file lock.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.