DavidPayne
Posts: 19
Joined: Fri Aug 31, 2007 1:26 pm

Multiple Products One File Association (Java)

Hi,

Sorry if this has been asked often before, I searched, but couldn't find a solution.

My problem is this:

I have three products, A, B, C. Each product is almost identical, but with slight differences. Each has a different main JAR file, and B has some extra files that are bundled with it.

Therefore, I see three different .exe files, A.exe, B.exe, C.exe.

However, for all of the three products, I only have one file association: .abc

So, if a user has product A installed, and uses it, he will create files called *.abc. The same for product B, and product C.

What I want to do is to say that, for a product A build, I need a file association, where .abc runs A.exe; for a product B build, my file association should be that .abc runs B.exe, and for a product C build, my file association should be .abc runs C.exe.

One file extension is fine: .abc, with the command APPDIR\A.exe, but when I try to add another, if I enter abc as the extension, an error message saying 'Duplicate extension not allowed' is shown. I've tried having two 'ProgId's as well, with the same error message.

Is there any way to do this?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Currently this can be done only by creating a different project for each product (this way you will not have duplicate extensions). In each of the three projects you create the same extension for each project.

Note that if all three products will be installed then the extension will be opened by default with the product that was installed last (you can select which program will open the file with the Windows "Open With" menu).

However, I have added on our TODO list a feature that will allow you to create duplicate file extensions in the "File Associations" page. This feature will be included in a future version of Advanced Installer.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DavidPayne
Posts: 19
Joined: Fri Aug 31, 2007 1:26 pm

OK - fair enough. Thanks for the quick response.

I'll split it into three projects, and go with that. I don't suppose you could predict when / if the change is likely to be added? For now I only have 3 products, but this is likely to increase in the near future, so obviously managing different projects will become an annoying overhead.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

I'm afraid that I cannot give you an ETA for now, but most likely this feature will be available at the beginning of 2008 (a couple of months from now).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jasoncd
Posts: 49
Joined: Thu Jan 29, 2009 4:48 pm

Re: Multiple Products One File Association (Java)

Is there any update on this? I seem to be having the same problem, or I am doing it wrong. Not using Java, but I'm trying to put two different versions of the exe's in the same project. I assume this problem would occur when trying to do 32-bit vs. 64-bit in the same project?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Multiple Products One File Association (Java)

Hi,

I'm not sure I understand the problem you are encountering. Can you please give me more details about this? Do you need to create the same file association for multiple applications in the same package or you want to simply install two versions of your main EXE?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jasoncd
Posts: 49
Joined: Thu Jan 29, 2009 4:48 pm

Re: Multiple Products One File Association (Java)

I have one project with multiple builds. One build contains the debug version of an EXE, the other one contains the release version of the EXE. So I have extensions that need to be associated depending on the which build it is. If I was using 32-bit and 64-bits builds in the same project, I assume I would have the same problem, because each builds needs the extension associated with a different EXE...
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Multiple Products One File Association (Java)

Hi,
I have one project with multiple builds. One build contains the debug version of an EXE, the other one contains the release version of the EXE.
For this you can try using two different features (one for each EXE). After that, in the Organization page you can use the Feature Properties pane to set the builds in which the features are included (the feature with the debug EXE in the debug build and the feature with the release EXE in the release build).
So I have extensions that need to be associated depending on the which build it is.
Unfortunately Advanced Installer does not support per-build file associations. However, you can try this approach:
- in the "Files and Folders" page add the release EXE in "Application Folder"
- under "Application Folder" create a new regular folder and place the debug EXE in it
- both EXE files should have the same name
- double-click the folder you created and in its Edit Folder dialog check the "Install folder content into the parent folder" option (this way the debug EXE will be installed in "Application Folder")
- create the file association for the EXE in "Application Folder"

Depending on the build, the EXE used by the file association will be the debug or the release version.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jasoncd
Posts: 49
Joined: Thu Jan 29, 2009 4:48 pm

Re: Multiple Products One File Association (Java)

Ok, I tried that. All files installed correctly, as expected. But the shortcuts and file associations did not get installed with the debug version. I think maybe this is because they are associated with the release feature, which doesn't get installed? You can see my project layout in the file that I emailed a little awhile ago for the other problem.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Multiple Products One File Association (Java)

Hi,

Indeed, the file association is bound to the component of its target (I didn't consider this limitation).
Since the file association cannot be shared between components, a solution is to create the registry entries manually by using the Registry page. Perhaps these articles will help you:
article 1
article 2

The registry entries should point to the EXE in "Application Folder". Depending on the build, the EXE will be the debug version or the release version.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”