Xojo/Inno Icons

What do you need to do to get your Xojo icons (App and Docs) to associate with your app on Windows?
Does Windows not use the icons we embed in our Mac app. I am using Inno Setup

Just to explain further. It is the Filetypes that my app produces don’t show up. When I look in the Resources folder they aren’t exported to directly reference in Inno so not sure how to get to them.

I tried experimenting with the following but got a bit lost
[Registry]
Root: HKCR; Subkey: “.cwwtext”; ValueType: string; ValueName: “”; ValueData: “Crossword Wizard”; Flags: uninsdeletevalue
Root: HKCR; Subkey: “Crossword Wizard”; ValueType: string; ValueName: “”; ValueData: “Crosswords”; Flags: uninsdeletevalue
Root: HKCR; Subkey: “Crossword Wizard\DefaultIcon”; ValueType: string; ValueName: “”; ValueData: “{app}\Crossword Wizard Resources\DocIcon.ico,0”
Root: HKCR; Subkey: “Crossword Wizard\shell\open\command”; ValueType: string; ValueName: “”; ValueData: “”"{app}\Crossword Wizard.exe"" “”%1"""

The Xojo odcs have sample Inno code…

First change the [Setup] section directive "ChangesAssociations" to "yes". If you don't do this, the correct icon for the file type likely won't be displayed until the user logs off or restarts the computer.

ChangesAssociations=yes
Now you can add a [Registry] section with the entries as shown below.

[Registry]
Root: HKCR; Subkey: ".myType"; ValueType: string; ValueName: ""; ValueData: "MyAppName"; Flags: uninsdeletevalue
Root: HKCR; Subkey: "MyAppName"; ValueType: string; ValueName: ""; ValueData: "My Program File"; Flags: uninsdeletekey
Root: HKCR; Subkey: "MyAppName\\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\\MyAppFileIcons.ico"
Root: HKCR; Subkey: "MyAppName\\shell\\open\\command"; ValueType: string; ValueName: ""; ValueData: """{app}\\XojoApp.exe"" ""%1"""


"DefaultIcon" is the registry key that specifies the filename containing the icon to associate with the file type. For best results use an .ico file. Be sure to include this ico file in the main installer script so that it is available for use. There are free online services than can create an ico file for you from an initial image or icon.

https://documentation.xojo.com/topics/windows/creating_an_installer_with_the_inno_setup_script_(32-bit_apps).html

the Filetypes that my app produces don’t show up<< That Xojo feature only works on a Mac, apparently, hence the Inno setup thing for Windows

Thanks Jeff, that should solve the issue.
Cheers
Martin

A nice Xojo feature would be if the filetypes icons that are in the Mac version are exported to the Windows App Resources folder as .ico files ready to import using Indo Setup :slight_smile:

Ok after many hours I’m still stuck here.
I can only get one Icon to appear correctly and that is always the last one in the REGISTRY sequence. So whatever one I put last all the file types take on that icon? Below both ‘Shape’ and ‘Crossword’ files take on the Crossword icon. Suggestions?

Root: HKCR; Subkey: “.scwtext”; ValueType: string; ValueName: “”; ValueData: “Crossword Wizard”; Flags: uninsdeletevalue
Root: HKCR; Subkey: “Crossword Wizard”; ValueType: string; ValueName: “”; ValueData: “Shape”; Flags: uninsdeletekey
Root: HKCR; Subkey: “Crossword Wizard\DefaultIcon”; ValueType: string; ValueName: “”; ValueData: “{app}\Icons\CWWShape.ico”
Root: HKCR; Subkey: “Crossword Wizard\shell\open\command”; ValueType: string; ValueName: “”; ValueData: “”"{app}\Crossword Wizard.exe"" “”%1"""

Root: HKCR; Subkey: “.cwwtext”; ValueType: string; ValueName: “”; ValueData: “Crossword Wizard”; Flags: uninsdeletevalue
Root: HKCR; Subkey: “Crossword Wizard”; ValueType: string; ValueName: “”; ValueData: “Crosswords”; Flags: uninsdeletekey
Root: HKCR; Subkey: “Crossword Wizard\DefaultIcon”; ValueType: string; ValueName: “”; ValueData: “{app}\Icons\CWWDoc.ico”
Root: HKCR; Subkey: “Crossword Wizard\shell\open\command”; ValueType: string; ValueName: “”; ValueData: “”"{app}\Crossword Wizard.exe"" “”%1"""

I’ve used this service to create the .ico version in the past: https://www.convertico.com

Hi Martin, you’ve got two threads going on this - see solution here: https://forum.xojo.com/58458-inno-registry

Thanks Bob and apologises Michael not sure why I started 2 threads