Skip to content
⌘ NSIS Forum Archive

Install stamps for pdf readers

5 posts

Tom7320#

Install stamps for pdf readers

Hi!

I have to write an installer for pdf stamps. The problem is, that I have to figure out what pdf reader(s) the user has installed on the system. The stamps are stored in specific paths depending on the reader and the version of the reader... :-( Another idea could be to search the system for a folder called "stamps" and present the user a list of dirs found to select from....

Is this possible with NSIS? So far I have written only a couple of simple installers which worked quite well. But I don't know how to solve the stamp problem.

Any ideas would be appreciated!

Regards,

Tom
Anders#
I'm guessing Sumatra PDF does not support this? Do you have a list of readers? Only Adobe? Foxit?

You can search a volume with the ${Locate} macro but it is probably better to look in the registry to find the install locations...
Tom7320#
Thanks for your answer!

Unfortunately I can not foresee what pdf reader the users might have installed. So probably the best thing would be to figure out the standard pdf reader from windows registry. But, to be honest, I have no idea how to do that......

Regards,
stass#
Tom7320
You can define a program that works with the default PDF files

StrCpy $R1 pdf
FileOpen $0 "$TEMP\opens_by_default.$R1" "w"
FileClose $0
System::Call "Shell32::FindExecutable(t '$TEMP\opens_by_default.$R1', i 0, t .r1)" 
Delete "$TEMP\opens_by_default.$R1"
MessageBox MB_OK '$R1 files by default opens the program:  : $1 ' 
Or just prior to installation, ask a question-message: Specify directory with PDF Reader.
And use the specified path...