How to install specific files for specific prerequisite? - 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!

rudyz
Posts: 4
Joined: Thu Mar 18, 2010 12:49 pm

How to install specific files for specific prerequisite?

I have searched the help documents as well as the how to's and can't find exactly what I am looking for.

I am trying to build a package that will install specific sets of files/folders to a specific location on the target based on the existence of a specifc version already on the target. This would be similar to a patch, however I am not patching my own application rather adding files to a third party application already installed.

For example on the target there could be 1 or more versions of a third party application side by side.

If the target machine has version 1 installed, I want to install a group of folders/files called version 1 update to directory 1
If the target machine has version 2 installed, I want to install a group of folders/files called version 2 update to directory 2
If the target machine has version 3 installed, I want to install a group of folders/files called version 3 update to directory 3

and so on.

Also, if there exists multiple versions side by side on the target, I want the installer to prompt which version to update.

For example a dialog to the user that says something like "Setup has detected version 1 and version 2 on your computer. Which version do you wish to update?"

Ideally this would allow the user to select 1 or more versions to install/update at that time, or at least allow for the installer to run a second time to install/update additional versions.

On the target, there will be a different registry entry for each version that exists with a directory location of that version. The installer will update and install the files/folders to the directory returned by the registry search.

I know how to do the registry search and test the result, but beyond that I dont know how to add the logic to add version specific files. I think I need multiple builds as well, but I cant understand how to link a build to an existing version and allow the user to select which version to install if multiple versions exist.

I should also note that the files/folders I want to install are not the same and have entirely differnt directory structures depending on the version already installed.

By the way, I have created separate .msi installers for each version, but rather than managing 3 installers, I would like to package one installer that can install any or all version updates.

One last thing to note, there will be at least 1 file that would be installed to the same place regardless of the version that is select. e.g. a user manual placed in the "My Documents" folder and Shortcut on the Desktop and the Program Group in the start menu. There shouldnt be any conflict when installing multiple version updates if these shared files and shortcuts exist.

Is an install scenario like this already addressed in the forum, help documents, or elsewhere?

If not can some one please help me understand how to accomplish this?

I am using the Pro version of Advanced Installer.

Thank you.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to install specific files for specific prerequisite?

Hello,

After doing the search and thus determining the versions installed, you will display a prompt asking which install to patch. Since you can not create UIs in the professional version (only in an enterprise version can this be done), you will have to create your own custom action to enable the user to select.

After the user has selected which one to patch, you will store his choice in a property.
Each version specific patch your installer contains will be represented as a Feature in the Organization page. So, a patch for version 1 will be Feature1. Feature2 will contain the resources for patchinv version 2 and so on.
Having the feature selected, you will select its install location from the directory field. The location must be a property based folder which you can later change (by changing its property) to the location to which the version to be patched is located at.

You can manipulate the "Conditional install level" of each feature to decide whether the patch corresponding to the feature will be installed or not.
One last thing to note, there will be at least 1 file that would be installed to the same place regardless of the version that is select. e.g. a user manual placed in the "My Documents" folder and Shortcut on the Desktop and the Program Group in the start menu. There shouldnt be any conflict when installing multiple version updates if these shared files and shortcuts exist.
Place any resources that will always be installed into a separate feature which will always be installed.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
rudyz
Posts: 4
Joined: Thu Mar 18, 2010 12:49 pm

Re: How to install specific files for specific prerequisite?

GabrielBarbu wrote:Hello,

After doing the search and thus determining the versions installed, you will display a prompt asking which install to patch. Since you can not create UIs in the professional version (only in an enterprise version can this be done), you will have to create your own custom action to enable the user to select.
Hi Gabriel,

Thank you for your reply. I think this is where i am having the problem. Your expanation of having separate Features for each patch version now makes sense, but I am not clear on how to get to the part of the install where the user selects which version to install.

I have created 4 searches, each one returns a differnt directory path for the already installed application. I have named the property's

v1_location
v2_location
v3_location
v4_location

I am not understanding how to associate these searches to as custom action and thus present the user with the various choices.

I am not very experienced with Advanced Installer yet, this is my 2nd package creation, and the first was done with the "simple" wizard. Please can you explain how I might go about linking the search results to a custom action which presents the choices to the user?

Thank you,

Rudy
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to install specific files for specific prerequisite?

Hi Rudy,

Since you are new, the following tutorials will be very helpful to you:
http://www.advancedinstaller.com/user-g ... rials.html

The first two will be especially useful as they explain the most commonly used features and will help you better understand how to use Advanced Installer to efficiently deploy your product.

Searches, as can be seen in our user manual, store their results in properties. You can use those properties to condition the execution of a custom action. Our tutorials explain this in more detail.
If a search was successful, its property will be set. If the property is set, then the custom action's condition in which it is placed will evaluate to true and the custom action will start.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
rudyz
Posts: 4
Joined: Thu Mar 18, 2010 12:49 pm

Re: How to install specific files for specific prerequisite?

Gabriel,

I've gone through a few of the tutorials, as well as read many of the how to's as well as searched the help documents. But I was unable to find the information I need. I will look through some different tutorials.
Simply put, as soon as the installer is executed, I want the registry searches to be completed, if any of the registry searches return true, the option to update that version is given in a list of versions that can be updated. If no search is returned true, the user is told that no existing version could be found and the installer exits.

At the moment the way I have created my separate features, the first dialog the installer shows is Typical, Custom, and Complete. This not what I want. There should be no options other than radio buttons or check boxed that show which versions were detected and are available for update. If none are found, then a message saying none were found, and then the installer exits.

I understand this is a support forum for bugs etc., and may not be intended as a place for how to advice, but can you tell me if there is a specific tutorial or "how to" that explains how to accomplish what I am trying to acheive? Or perhaps more than one tutorial or "how to" that explains each phase? If not, can you suggest a search string I can use to search the help documents that will explain how to accomplish this? Is there a resource online where users can get the type of assistance I am after?

If what I am trying to acheive is not possible with the pro version then we will would consider upgrading to the enterprise version, as this method of deploying updates is vital to our business, and we have the need to create update installers for a very wide range of third party applications. I just need to know that what i require can be accomplished.




Thank you
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to install specific files for specific prerequisite?

Hello,
At the moment the way I have created my separate features, the first dialog the installer shows is Typical, Custom, and Complete. This not what I want. There should be no options other than radio buttons or check boxed that show which versions were detected and are available for update. If none are found, then a message saying none were found, and then the installer exits.
I am afraid creating custom dialogs with radio buttons and other such controls is only available in an Enterprise project.
Removing the Typical, Custom, Complete choices can be don by removing the SetupTypeDlg from the dialog sequence.
I understand this is a support forum for bugs etc., and may not be intended as a place for how to advice, but can you tell me if there is a specific tutorial or "how to" that explains how to accomplish what I am trying to acheive? Or perhaps more than one tutorial or "how to" that explains each phase? If not, can you suggest a search string I can use to search the help documents that will explain how to accomplish this? Is there a resource online where users can get the type of assistance I am after?
This is not only a forum for bugs, this is also a place where Advanced Installer users can find help and suggestions. What we do not do is create the projects for our customers. We do however offer advice on how to achieve various tasks.

You are the first to require this behavior from an installer, which is why we do not have any forum threads or documentation on this. However it should be doable, as I described above and in the previous posts.
My suggestion is to use a list box/combo box to contain the detected installed versions, as you do not know how many will be available on the system. The following article describes how to
popoulate a combo box or a list box:
http://www.advancedinstaller.com/user-g ... t-populate

This would be the first step in creating your installer. You'd then need to create a custom action that will form the CustomActionData for use in populating the listbox.
I should inform you that what you are trying to do is no easy task even if you are using such an intuitive application like Advanced Installer.

Let me know if this helped.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
rudyz
Posts: 4
Joined: Thu Mar 18, 2010 12:49 pm

Re: How to install specific files for specific prerequisite?

Hi Gabriel,

I'm getting closer. The problem I am having now, is I am unable to set a custom target directory for each of my features. Each of the folders and files for each feature is being installed to APPDIR. As stated in an earlier post, each feature, has a different directory structure. Files are installed into third party application directories, based on the registry search for that directory. Can you tell me how to set the install directory for individual features to a given registry search?

For example,

Feature1 should install to the directory returned in the search Ithat named version1_location
Feature2 to version2_location
Feature3 to version3_location

I have already created the folders under "files and folders" using the property of my registry search. However, the features are still being installed to the APPDIR.

I have also tried changing the install parameters, and while this changes the default APPDIR location, ALL features are still being installed to the one directory instead of the 3 different directories specified in my registry search.

Where/how do i change the location from APPDIR to my named registry directory search locations

=====================================================================================

EDIT:

Disregard this post as I have figured out how to link the items

Return to “Common Problems”