mheckmann
Posts: 74
Joined: Wed Apr 20, 2011 6:24 pm

Setting a Default Program on Condition

Hello,

my software comes with 2 executlables, a regular program and a "runtime" version. I would now like to let the user choose if the file type associated with my software should by defult be opened with the regular or with the runtime version.

Using the File Associations page I didn't succeed as I could not add the same extension to different ProgIds.
What would be the best course of action?

Thx
Markus
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Setting a Default Program on Condition

Hi Markus,

Please note that you can associate the extensions under the same ProgId with different executable files (see below image). Can you please tell us what versions of Advanced Installer are you using?
FileAssociation.png
FileAssociation.png (8.42 KiB) Viewed 4595 times
Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mheckmann
Posts: 74
Joined: Wed Apr 20, 2011 6:24 pm

Re: Setting a Default Program on Condition

Hi Dan,

thank you very much. I completely missed that and always thought I could only specify the extension only ones. I'll try this out.

Using Advanced Installer 12.0 at the moment.

Thanks again
Markus
Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Setting a Default Program on Condition

You're welcome Markus,

Yes, this option is available in the 12.0 version of Advanced Installer.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mheckmann
Posts: 74
Joined: Wed Apr 20, 2011 6:24 pm

Re: Setting a Default Program on Condition

Hi DAn,

so after adding in the same file association to the ProgId, how can I let the user choose which Extension to use by default. One of the 2 extensions I can place in a seperate feature but the second extension I then can't, the option is greyed out and therefor there is no way to add an condition?

Thanks
Markus
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setting a Default Program on Condition

Hello Markus,

You would't have to place each extension in a separate feature (than its associated EXE). All you have to do is to make sure the EXEs to which each extension is associated are placed in separate component. Then, you should use complementary conditions on the component of each EXE. An extension is installed only if associated component (from "Organization" page) is installed.

Here is a straight-forward test case you can use:
1. go to "File Association" page select the first extension and from its context menu choose "Go To Component" option
2. in "Organization" page, on the selected component add a condition like this:

Code: Select all

USER_PROP = <EXE1 selection>
3. repeat the first step for the second extension
4. in "Organization" page, on the selected component add a condition like this:

Code: Select all

USER_PROP = <EXE2 selection>
5. rebuild and test the scenario

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”