0

I am building an installer for a Ruby application using releasy. It creates an installer that creates a windows executable(i.e. launcher) for the application and one for the uninstaller. I would like to use different icons for the launcher and the uninstaller. I can't quite figure out how to do this. In my releasy project I think I have told it about the icon I wan't to use...

Releasy::Project.new do
  files ['*.rb', 'media/splash.png', 'media/uninstall.ico']
  ...
end

I have redefined WindowsInstaller#generate_installer_script to read,

UninstallDisplayIcon={app}\\uninstall.ico

in the relevant place.

Still no joy. I'm guessing that I'm not putting my icon in a place where it can be used but I'm not really sure what else to try doing.

Huliax
  • 1,489
  • 3
  • 15
  • 27
  • I don't think you want 2 backslashes... `UninstallDisplayIcon={app}\uninstall.ico` – Jerry Dodge Feb 03 '14 at 19:34
  • Yes, I suppose that it isn't perfectly clear that that is part of a Ruby string (as a heredoc). The first backslash escapes the second so that when the script is written it has only one backslash as you have shown. – Huliax Feb 04 '14 at 01:54
  • In My Inno Setup app, I have just 1 backslash and it works perfectly. And in fact it works without any backslash at all. Is this from Inno Setup or something else with similar syntax? Because if it is, then the script in Inno Setup should have nothing to do with Ruby syntax or string formation. It's a pascal based language of its own with its own rules. – Jerry Dodge Feb 04 '14 at 01:59
  • Ruby code writes the Inno Setup script. As I have already stated, the Inno Setup script only has one backslash. – Huliax Feb 04 '14 at 12:57
  • Now I see, I didn't know that Ruby code writes the Inno Setup script. – Jerry Dodge Feb 04 '14 at 14:01

1 Answers1

0

UninstallDisplayIcon affects the icon shown in the Programs and Features control panel.

If you are using an [Icons] entry to create a separate shortcut to the uninstaller (which is against Windows style guidelines, but some people do it anyway), you can set the IconFilename of this to point at a custom icon.

There is no way to change the icon of the unins000.exe file itself -- this will always be the SetupIconFile, same as the installer. (This is because the uninstall engine uses the same resources as the install engine.)

Miral
  • 12,637
  • 4
  • 53
  • 93