check for Adobe Reader - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

savneets
Posts: 2
Joined: Wed Aug 01, 2007 6:48 am

check for Adobe Reader

Hi,

I am creating the MSI installer in which i want to check the Adobe Reader is installed in the system or not. In case of it has not been install then it should tell user to install the software. My question is i able to check the checking of software but it is creating exe. i want it should be msi.

Regards,
Savneet
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

You can do this by using a prerequisite.
In the "Prerequisites" page, in the "Software" tab you create a new prerequisite. When you create it, in the "Install Conditions" tab, under the "Searches" section, you create a new search which will look like this:

Code: Select all

Criteria: Registry Subkeys Enumeration
RegistryKey : HKLM\SOFTWARE\Adobe\Acrobat Reader
Minimum: 8 (for example)
Maximum: 
Now if the required version Adobe Reader is not installed the Prerequisites dialog will prompt the user to install it.

You can read more about prerequisites here:
http://www.advancedinstaller.com/user-g ... sites.html
http://www.advancedinstaller.com/user-g ... requisites


Regards,
cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
savneets
Posts: 2
Joined: Wed Aug 01, 2007 6:48 am

While creating Prerequisites it covert them into exe. but i want all should be in MSI.

Regards,
Savneet
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

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:

Code: Select all

RESULT_PROPERTY <> value                Enable
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:

Code: Select all

RESULT_PROPERTY=value              Enable
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
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”