Associate verbs to two applications for a single extension - 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!

tmitchell
Posts: 5
Joined: Fri Jul 03, 2009 11:25 pm

Associate verbs to two applications for a single extension

I have an extension for which I'm trying to map the "Open" action as the default for one executable we install. I would like the "Edit" action to open a different executable. I've set this up with both verbs under a single ProgId:

Code: Select all

|Manufacturer.|ProductName.ext
-ext (command: exe1)
&Open
-ext (command: exe2)
&Edit
But both Open and Edit are being mapped to exe1. How do I configure this to do what I want? I can't create two ProgId's for the same extension it seems.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Associate verbs to two applications for a single extension

Hi,

Because of how Advanced Installer currently works, you cannot associate two executables with the same file extension from within the "File Associations" page.
However, you can try this:
- in the "File Associations" page, in your ProgID add your New Extension and associate your first executable (exe1) with it
- add a new verb with your extension, let's say an 'open' verb with the label "&Use exe1"
- this associates your first executable with your .ext file to be used with the "Use exe1" context menu
- to use another executable with another verb, you will need to hardcode it directly into the registry
- in the "Registry" page create this structure

Code: Select all

HKEY_LOCAL_MACHINE\Classes\[Manufacturer].[ProductName]\shell\edit\command
- you can replace 'edit' with whatever verb you want from these predefined verbs:

Code: Select all

open, edit, play, print, preview, explore, find
- in the 'edit' registry key, add a new value
- leave the 'Name' field blank and in the data field put whatever string you want to appear in the context menu (for example "&Edit", "&Open", or "Use exe2")
- in the 'command' registry key add a new value
- leave the 'Name' field empty, but this time set the value to (including the quotation marks):

Code: Select all

"[APPDIR]exe2.exe" "%1"
- replace 'exe2.exe' with the name of your second executable

That's it. Now build your installer and it should work.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”