Is there any way of only applying the file associations if no other version of the product is installed? I'm doing a beta version and want to allow the customer to install it side by side with the previous stable release to evaluate the product but what I don't want is for the beta to be launched if the user double clicks on one of the associated files. If there is no other installed product the file associations should be linked to the beta version. Is this at all possible without relying on writing my own script file to create the file associations?
Since the file association is linked to the key member of the component of the application (this means it is linked directly with the EXE of the application), Windows Installer doesn't allow you to condition only the creation of the file association.
The solution would be to use a custom action which creates the file association. This custom action can easily be conditioned by using the "Custom Action Properties" page.
My understanding is that I can execute an exe or script as a custom action at any stage of the installation sequence, but how do I conditionally execute part of the installation sequence? There doesn't seem to be any method for this or am I misunderstanding the documentation?
I have defined my file associations in the project but I do not want to establish these associations if there is another version of the product installed on the system. The only alternative I can see at this stage is to remove this from advanced installer and write my own script or binary that creates these associations as I can't figure out how to tell advanced installer to skip this stage during the install sequence if it has found a previous installation. Is this at all possible? As far as I understand the custom actions section it won't allow me to conditionally execute a standard action, is this true?
Like I said in one of my previous posts, you cannot condition the creation of a file association created by Windows Installer. The only solution is to use a custom action.
Also, you cannot condition a standard action because they are always executed for all MSI-based installation packages. However, you can condition your custom action which creates the file association.
FOLLOW US
Get the latest news in Application Packaging