Add File Association Option
Command Syntax
/AddFileAssociation <program_id> [-desc <description>] -ext <file_extension> [-cmd <command>] [-verb <verb>] [-verbcmd <verb_command>] [-verbarg <verb_arguments>]
This command will add a new file association to your project. Its equivalent UI options are included in the "New" toolbar section from the File Associations page.
Parameters:
- <program_id>
- The program ID under which the extension will be created. If it doesn't exist, it will be created.
- -ext <file_extension>
- The new extension.
Optional Parameters:
- [-cmd <command>]
- The path of the program associated with the extension. This parameter is mandatory only when creating a new extension.
- [-desc <description>]
- An optional description of the program ID.
- [-verb <verb>]
- The name of the verb as it will appear on the target OS. The default value is open.
- [-verbcmd <verb_command>]
- An action for the verb. The default value is &Open.
- [-verbarg <verb_arguments>]
- The command line arguments passed to the program which the extension is associated with, when this verb is selected from the OS context menu. The default value is "%1".
The default parameter for verb arguments "%1" is passed from command line as """%1""". That is, each " character must be escaped with another quote: "". The external quotes are removed by command line interpreter and are not passed on to AdvancedInstaller.com tool.
Examples:
The following example uses default parameters for the verb.
AdvancedInstaller.com /edit YourProject.aip /AddFileAssociation "[|Manufacturer].[|ProductName].txt" -desc "Your App files description" -ext txt -cmd APPDIR\YourAPP.exe
Adding a new verb with arguments to an existing extension.
AdvancedInstaller.com /edit YourProject.aip /AddFileAssociation "[|Manufacturer].[|ProductName].txt" -ext txt -verb "edit YourAPP" -verbcmd "&Edit with YourAPP" -verbarg "--file ""%1"""