cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gilberttt
Level 3

Launch a PDF with 2011 Pro

Is there a KB article or example on how to launch a PDF from the SetupCompleteSuccess dialog?

I found the following kb article that explains pretty simply how to display a readme file using 2011 express. I can't find these settings in 2011 Pro.

http://kb.flexerasoftware.com/doc/Helpnet/InstallShield2011Express/IHelpISXDialogsSetupCompleteSuccess.htm

Seems to me that you should be able to easily point to PDF file, or any file for that matter, and have it displayed using file associations.

Any one know of a way to do this?

Is this the only way to do it?

http://kb.flexerasoftware.com/selfservice/viewContent.do?externalID=Q106070

Search for an app that can read a PDF file and then use it to display the file?

Any help would be appreciated.
Labels (1)
0 Kudos
(2) Replies
Cary_R
Level 11

Hi There,

There's many ways to accomplish this. Basically, the trick is to get the windows shell to invoke the *.pdf file, which on the back end is the ShellExecute() API.

In InstallScript you can use LaunchApplication with the LLAW_OPTIONS_USE_SHELLEXECUTE flag, or you can use an Executable custom action with commands like:

[WindowsFolder]Explorer.exe "[INSTALLDIR]my.pdf"
[SystemFolder]cmd.exe /c "[INSTALLDIR]my.pdf"

Or if you are even more determined I sometimes use a ShellExecute API wrapper in executable form:

http://www.optimumx.com/downloads.html#ShellExecute
0 Kudos
gilberttt
Level 3

Thank you Cary!:D

This worked great.

For others that may need more help:

This opened my PDF with Internet Explorer.
[WindowsFolder]Explorer.exe "[INSTALLDIR]my.pdf"

This opened a command window and the opened the PDF with Adobe. The command window did not close until the PDF was closed. However, it was hidden in the background.
[SystemFolder]cmd.exe /c "[INSTALLDIR]my.pdf"

Custom Action
1. I created a "New EXE" -> "Path referencing a directory" custom action named it CAOpenUpdateDocument.
2. I set the "Working Directory" to my Documents folder path.
3. I set the "Filename & Command line" to [WindowsFolder]Explorer.exe "[DOCUMENTS]my.pdf". [DOCUMENTS] is a sub folder that I created under my applications folder tree.
4. I set "Return Processing" to "Asynchronous (No wait for completion)"

SetupCompleteSuccess Dialog
1. I changed the "LaunchReadmeText" on the dialog to "View the [ProductName] [ProductVersion] update document."
2. I added a "DoAction" event to the "OK" "PushButton".
a. Event = DoAction
b. Argument = CAOpenUpdateDocument
c. Condition = LAUNCHREADME


Property Manager
1. I added "SHOWLAUNCHREADME" and set it to -1
2. I added "READMEFILETOLAUNCHATEND" and set it to "[DOCUMENTS]PARTPAK Update Document.pdf".

Thank you for your help!;)
0 Kudos