I use MUI_FINISHPAGE_SHOWREADME to open a pdf at the end of an installer. (NSIS 2.45 / MUI 1). This has worked fine for years when tested on windows7 or earlier. Now i started testing the installer in W10, and it seems that the pdf file never opens.
Before running the installer, acrobat reader can open any pdf including the one in the installer. After the installer has tried opening the pdf, AcroRd32.exe is still running, and until i kill it, i can not anymore open another pdf manually.
I am an admin user and try to run the installer as admin, but this changes nothing.
I tried running in a command line the same command that has been run by the installer (optained from task manager process properties, a simple path/to/acrord32.exe path/to/my.pdf) and this works perfectly
Did someone see such behaviour with W10?
NSIS 2.x just calls ShellExecute which is the correct way to open a file-type in their default program.
It is possible that Acrobat Reader has not initialized correctly when that call returns. You can try to work around that by adding a delay:
If you are using NSIS 3 you could try
or
Last edit: Anders 2019-03-19
It seems not totally by windows 10, but caused by acrobat reader protected startup. Disableing it makes the problem disappear. Not realy sure if there is a workaround, or if i should live with the fact that users with that acrobat reader setting will not be able to read PDFs from the installer
Seems like Acrobat Reader won't open PDF files from an elevated process (RequestExecutionLevel admin) using ShellExecute (that the default showreadme uses) under Windows 10/UAC.
Anders workaround to sleep during ShellExec does not work.
However, it seems that an NSIS plugin does exist to run unelevated commands and when used in a function (MUI_FINISHPAGE_SHOWREADME_FUNCTION ), this perfectly workaounds the issue.
If this can help someone...
The woraround will only work for buggy in-process shell extensions, not something that just refuses to run correctly if started at high IL.