How to integrate acrobat reader with my exe installer?

Comments

1 comment

  • Avatar
    juanjo

    I believe you first need to apply for a license as explained here

    After that, you will be able to download a redistributable package, which can be installed in unattended mode from the installer using the command suggested in this post:

    <runProgram>
      <program>${installdir}/adobe/AdobeRdr1000.exe</program>
      <programArguments>/msi EULA_ACCEPT=YES /qn</programArguments>
    </runProgram>
    

    Or if you want to just point your users to the website for them to download it, you could launch a browser to the download page if the user does not have it:

    <booleanParameter>
       <name>get_adobe_reader</name>
       <explanation>Adobe Reader is required, check the below if you do not already have it installed to visit the download page. After downloading and installing it, please continue with the installation</explanation>
       <description>Visit Adobe Reader Download Page</description>
       <value>1</value>
       <postShowPageActionList>
        <launchBrowser>
          <url>http://get.adobe.com/reader/</url>
          <ruleList>
            <isTrue>
                <value>${get_adobe_reader}</value>
            </isTrue>
          </ruleList>
        </launchBrowser>
       </postShowPageActionList>
       <ruleList>
         <registryTest>
           <key>HKEY_CURRENT_USER\\Software\\Adobe\\Acrobat Reader\\10.0\\InstallPath</key>
           <logic>does_not_exist</logic>
           <name></name>
         </registryTest>
       </ruleList>
    </booleanParameter>
    

    Please not the page is just displayed if Adobe Reader is not found in the registry but it still make it possible to continue without installing it. If you want to prevent the installation, you could just throw an error in the initialization:

    <initializationActionList>
        <actionGroup>
            <actionList>
                <launchBrowser>
                    <url>http://get.adobe.com/reader/</url>
                </launchBrowser>
                <throwError>
                    <text>This installer requires Adobe Reader. Please, install it and relaunch te process.</text>
                </throwError>
            </actionList>
            <ruleList>
              <registryTest>
                <key>HKEY_CURRENT_USER\\Software\\Adobe\\Acrobat Reader\\10.\\InstallPath</key>              
                <logic>does_not_exist</logic>
                <name></name>
              </registryTest>
            </ruleList>
        </actionGroup>
    </initializationActionList>
    

Please sign in to leave a comment.