InnoSetup File Association with Multiple File Extensions

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello,

Since Microsoft says they are done with Setup Deployment , Im switching to
InnoSetup to create installers. So far, Ive figured out most parts. The only thing that I dont quite understand is the file association. More specifically, I want to know how to handle multiple file extensions.

So let me say that I have an application whose executive file inside the
Program Files folder is MyApp.exe. I understand that I need "ChangesAssociations=yes" under the
Setup section. The part that I dont get is the internal name when you have multiple file extensions.
<span style="text-decoration:underline Do you need a separate internal name for each file type like

<pre class="prettyprint Root: HKCR; Subkey: ".txt"; ValueType: string; ValueName: ""; ValueData: "MyApp1"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "MyApp1"; ValueType: string; ValueName: ""; ValueData: "My Program File"; Flags: uninsdeletekey
Root: HKCR; Subkey: "MyApp1DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}MyApp.exe,0"
Root: HKCR; Subkey: "MyApp1shellopencommand"; ValueType: string; ValueName: ""; ValueData: """{app}MyApp.exe"" ""%1"""

Root: HKCR; Subkey: ".rtf"; ValueType: string; ValueName: ""; ValueData: "MyApp2"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "MyApp2"; ValueType: string; ValueName: ""; ValueData: "My Program File"; Flags: uninsdeletekey
Root: HKCR; Subkey: "MyApp2DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}MyApp.exe,0"
Root: HKCR; Subkey: "MyApp2shellopencommand"; ValueType: string; ValueName: ""; ValueData: """{app}MyApp.exe"" ""%1"""[/code]
<br/>
under the Registry section. Or <span style="text-decoration:underline
do you just use the same internal name for all file extensions?

Well, Im not so familiar with Windows software development. And I dont know anything about the registry thing. So I dont even want to test this code and end up screwing up my OS.

Thank you.

D.B.

View the full article
 
Back
Top