PDA

View Full Version : Custom Action For Adobe Acrobat



OverKill
01-21-2003, 12:00 PM
I am setting up a custom action to install Adobe Acrobat Reader if the user's computer does not have Reader installed. I am trying to figure out where I should store the acrobat reader installation files so I can access the setup file from my custom action? I also would like my installation program upon completion to delete these acrobat reader installtion files. Would placing these files into the [TempFolder] accomplish this? If not, where is the best place to place these adobe files?

Chandima
01-21-2003, 03:29 PM
Since you are using Express 4.0:

1. Put the Acrobat redist files in the "English" node of Setup Files View
2. Create an Exe Custom Action
3. Set it's "Source Location" to "File exists on target machine"
4. Set folder property to "[SUPPORTDIR]"
5. Set the File name property to "Setup.exe" (or whatever the Acrobat setup is called)
6. Build and install

The Acrobat setup files will be deleted after the setup completes (this is the way anything in the Setup Files View behaves).

OverKill
01-23-2003, 05:05 PM
Thanks for the help Chandima, but I have one other problem. Since I am attempting to do a silent install of Adobe Acrobat Reader, I have to send the -s command line to the setup file. This part is fine, the problem is that adobe install files also include folders. The problem is that in the Setup Files section, I can only add files and not these folders. Is there any way to add these folders here and the files including in them?

What might work is if I install Adobe Acrobat Reader right off of the CD. Is there a way in the custom action to pick an exe off of the installing CD-ROM?

Any other ideas would be greatly appreciated.

Chandima
01-23-2003, 05:56 PM
We could cheat a little :).

Use something like Package For The Web (free download from our website) to package the adobe setup in to a self extracting exe file. In Package For The Web you can tell it to launch a file within it and pass in command line parameters (like the -s). Add this self-extracting exe file to Setup Files and call it as mentioned. This will in turn uncompress the adobe files and install it.

Rick Hjo
03-04-2003, 09:46 AM
How do i check if the installation is nessesary? ie. if there alredy exist programs that can open and view PDF files?
I guess that I create a Condition with the System Search Wizard, but i dont know what to search for.
Is there any specific registry key that i can look for that is common for all pdf viewers?

Thanks /Rick

OverKill
03-04-2003, 10:25 AM
What I did was create a custom action to call the adobe acrobat setup program. Under the custom action properties, right at the bottom is a property called condition. Here you can set a condition for the custom action to run. Install Shield Express 4.0 comes with some conditions already for us, and one of these is for Adobe Acrobat Reader 5.0 to be installed. So I picked that and told the condition to only run the setup program if acrobat reader 5.0 was not installed.

You can look at these conditions by selecting the requirements section, its just above the custom actions section. And you can add your own. In creating your own, you can set the install program to search a clients computer for either e registry entry or the existance of a file.

I hope that helps.

Rick Hjo
03-04-2003, 11:08 AM
Thanks for the reply!
It was helpful, but it did not get me all the way. I need to check if there is any version of Acrobat or Acrobat Reader installed on the system, not just Reader 5.0
Does anyone know how to create a condition that accomplishes that?

/Rick

Chandima
03-05-2003, 12:37 PM
What if you perform a search on the machine that looks for the Adobe Reader exe file? I'm sure (hoping) that all versions name their exe the same.

The default search checks a registry entry but due to a Windows Installer limitation I don't think we can use it for this purpose.

Rick Hjo
03-19-2003, 05:02 AM
Hi, i don't know if i am doing the search the wrong way.
The result is that the when installation is run the installshield wizard and the windows installer starts, but then all the dialogs dissappear for a very long time about 3 minutes, i guess this is when the search is performed
There are no feedback to the user that there is something going on, after a long time the installshield wizard dialog appears again and the installation proceeds.
Is this the way its supposed to be?
The user will think that something went wrong and try to execute the setup file again possibly.

I have created a SoftwareRequirement which searches for filepath in all drives down to 10 subfolders for a file named acrord32.exe

This requirement is used by a Custom Action which is invoked After register product.

Is there another way to find out if there are a pdf reader on the system?

//Rick

Chandima
03-20-2003, 04:19 PM
This is the expected behavior. That's how the Windows Installer behaves. It performs all the searches before launching any dialogs. Out of the 4 search types, I have also noticed that searching all drives for a file is the slowest.

Had an idea. You could check the registry for the following key:

HKEY_CLASSES_ROOT\.pdf

I think this registry entry get's written when the pdf extension is associated with some application on the system. This is just a theory though so I recomend testing it first.