July 30, 2014

To launch PDF as ReadMe file on the Installation Success using InstallShield



This will guide you to how to open a PDF at the end of the installation if the read me check box is selected by the user. To achieve these are the steps needs to be followed
1.      Registry search for adobe reader location
2.      Create a custom action to launch readme file
3.      Modify the SetupCompleteSucess Dialog
4.      Add some properties to Property Manager

Registry search for adobe reader location
·         Open InstallShield and go to Behavior and Logics & System search
·         Now right click and add a new system search
·         Click and choose for registry entry and enter the following values
o   Registry root: HKEY_LOCAL_MACHINE
o   Registry path: SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe
o   Registry value: path
·         Click next and Store the value in this property, in that field enter ADOBEPATH. Just leave the option "Store the value in the property".

Custom Action
·         Go to custom actions and create "New EXE" -> "Path referencing a directory" and name it as LaunchReadMePDF.
·         Set the "Working Directory" to documents folder path(In my case it is INSTALLDIR).
·         Set the "Filename & Command line" to "[ADOBEPATH]AcroRd32.exe" "[INSTALLDIR]ReadMe.pdf"
·         Set "Return Processing" to "Asynchronous (No wait for completion)"

SetupCompleteSuccess Dialog
·         Go to Dialogs & SetupCompleteSuccess Behavior
·         In the Controls go to OK and add an event and  enter the following
Event = DoAction
Argument = LaunchReadMePDF
Condition = LAUNCHREADME

Property Manager
Go to Property Manager and add the following Properties
·       ·           SHOWLAUNCHREADME and set it to -1
·       ·           READMEFILETOLAUNCHATEND and set to 1

For this process to work Readme.pdf file should be deployed to INSTALLDIR as part of file copy or you can change the path accordingly.