Hi,
I recommend you use a prerequisite!
However, another way to do this is by using a custom action and a registry search.
First you create a registry search for a value in
HKLM\SOFTWARE\Adobe\Acrobat Reader\8.0 (make sure its a string value). The result of the search will be placed in the RESULT_PROPERTY property.
In the "Custom Actions" page you create a "Launch File or Open URL" predefined custom action under "UI Custom Actions". You set the "Command Line" for the custom action to
http://ardownload.adobe.com/pub/adobe/r ... _en_US.exe (the link to the setup file of Adobe Reader).
Now in the "Dialogs" page you can add to a dialog a button which will launch the custom action. For example: in the "VerifyReadyDlg" you create a button named "Install Adobe Reader" and in the "Properties" page, "Attributes" section, you set "Enabled" to "False". In the "Published Events" tab you create two events:
Code: Select all
[RESULT_PROPERTY] value AI_INSTALL
DoAction viewer.exe AI_INSTALL
where
value is the value you are searching in the registry and
viewer.exe is the custom action you created.
In the "Control Condition" tab you create the following condition:
This will activate the "Install Adobe Reader" button if Adobe Reader is not installed.
For the "Install" button, in the "Properties" page, "Attributes" section, you set "Enabled" to "False". In the "Control Conditions" tab, you create a new condition which looks like this:
This will enable the "Install" button only if Adobe Reader is installed or if the "Install Adobe Reader" button has been clicked.
Note that you can create a new custom dialog and apply these settings if you don't want to use the "VerifyReadyDlg" dialog.
Regards,
cosmin
FOLLOW US
Get the latest news in Application Packaging