rnv.kalz
Posts: 19
Joined: Wed Apr 20, 2011 9:54 pm

open PDF file during install

Hi,
We need to open a PDF file during installation process. To be specific, during step 3 of 7 if the user wants to read the PDF documentation (exists in the Application Folder) on some hyperlink or button click..we should open/show the PDF document.

I tried using hyperlink from the "Toolbox"...but it is adding the http:// before the selected file and it is taking me to the web browser (and fails) instead of opening the .PDF file. Please help. Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: open PDF file during install

Hello,

You can use a "Launch File or Open URL" predefined custom action for this purpose. Here is the user guide reference for it.

If you want to launch the .PDF only during the install then you should also set the custom action with the following execution condition:

Code: Select all

NOT Installed
All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rnv.kalz
Posts: 19
Joined: Wed Apr 20, 2011 9:54 pm

Re: open PDF file during install

Thanks for the reply. But, It is not working for me..
Error Message: "There is a problem with this windows installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor"

All I did was..
From the Custom Actions Tag [on the left hand menu] I have selected "Launch File or Open URL" from the "Add predefined custom action" under "UI Custom Actions" then just added the .pdf file to the command line of the viewer.exe.


I have attached the viewer to the PUSH button and created a a new event in the "published Events" and the condition is DoAction, viewer.exe, AI_INSTALL AND (Not Installed)
If I give a url it works (Ex: www.google.com)..but if i give a file it doesn't work. What Am I missing.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: open PDF file during install

Hello,

If your .PDF file is among your application files, then it will not available in the UI sequence at runtime. It will only be available after the Install standard action.

You can try to add the .PDF as a temporary file in the Files and Folders page and use its formatted reference in the "Launch File or Open URL" custom action.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rnv.kalz
Posts: 19
Joined: Wed Apr 20, 2011 9:54 pm

Re: open PDF file during install

Thanks for the reply. It WORKS.

Detailed Steps:

1) Add the .pdf file as temporary files to the Application Folder in the "Files and Folders".

2) From the Custom Actions button [on the left hand menu] select "Launch File or Open URL" from the "Add predefined custom action" under "UI Custom Actions" then just add the .pdf file (will be available under temporary file folder) to the command line of the viewer.exe.
And change the selection to "Asynchronous execution, do not wait for return" from the "Synchronous execution, check return code" under Execution Properties.
If you don't change the selection your installer will crash because it is expecting a return code.

3) Attach the viewer.exe to the PUSH button and create a new event in the "published Events" and the condition is DoAction, viewer.exe

That's it.
lesliehedzg
Posts: 13
Joined: Tue Jul 24, 2018 10:05 pm

Re: open PDF file during install

HI,
I need to add a PDF file to a push button, I tried the steps above but I do not understand how to add it to my dialog, what properties do I need to modify in the push button.
Thank you.
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: open PDF file during install

Hello,

You can find the solution to your request in the following thread.

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”