I advise you to use InnoSetup for this. You can associate a program with an extension to add icons and run the program when users click on a file with this extension. (for example, to open a file directly in a program, for example, msoffice program). When we click on the Excel file, Excel launches and opens this file. You can do simple with InnoSetup and a little code in the main method for parsing arguments.
With Innosetup, you simply add the iIn [Setup] section
ChangesAssociations=yes
And in the [Registry] section
Root: HKCR; Subkey: ".mpl"; ValueType: string; ValueName: ""; ValueData: "{#MyAppName}"; Flags: uninsdeletevalue Root: HKCR; Subkey: "{#MyAppName}"; ValueType: string; ValueName: ""; ValueData: "Program {#MyAppName}"; Flags: uninsdeletekey Root: HKCR; Subkey: "{#AppName}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0" Root: HKCR; Subkey: "{#AppName}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}.EXE"" ""%1"""
Further information in this previous post.
source share