Archive: icons and uninstaller


icons and uninstaller
Hi everyone!
I am new with nsis development, sorry if I ask obvious things! Just I'm having some troubles with the use of icons and with uninstaller options. Mainly I encountered 2 "problems":

  1. ICONS
    At the beginning of the nsi file after the field "Name" I used the following code:
    Icon "icon-inst.ico"
    Seeing that the icon is in the same path as the nsi file.
    Then in uninstaller section I used:
    UninstallIcon "icon-uninst.ico"
    Once I compile the file I have this error:
    Generating uninstaller...
    Error finding icon resources: installer, uninstaller icon size mismatch - see the Icon instruction's documentation for more information -- failing!
    Error - aborting creation process
    the fact is that both the icon are exactly of the same size and they are both made with 1 single image 48x48 with 256 colors.
  2. UNINSTALLER
    Concerning the uninstaller I have to say that after the installation, the installer creates an icon on the desktop, linking the executable file. If I rename this link, then the uninstaller doesn't delete it. The instructions I used to delete the desktop link in the nsi file is:
    Delete "$DESKTOP\Exefile.lnk"
Any suggestions concerning these 2 questions( /problems )?
Thanks in advance, regards

For (1) above, I had that problem too. This worked for me, if using the MUI modern interface pages,


Icon "icon-inst.ico"
UninstallIcon "icon-uninst.ico"
!define MUI_ICON "icon-inst.ico"
!define MUI_UNICON "icon-uninst.ico"
For (2), once I rename or move a file or shortcut, then the uninstaller will not find it. That is intentional because whoever changes has decided to do things manually. You can search this forum for scripts that search and read shortcut links. But if the script finds the wrong one and deletes it, it might make the customer sad if he looses something.

Originally posted by jtbalogh
For (1) above, I had that problem too. This worked for me, if using the MUI modern interface pages,

Icon "icon-inst.ico"
UninstallIcon "icon-uninst.ico"
!define MUI_ICON "icon-inst.ico"
!define MUI_UNICON "icon-uninst.ico"
Ok perfect solution, thanks very much!
For (2), once I rename or move a file or shortcut, then the uninstaller will not find it. That is intentional because whoever changes has decided to do things manually. You can search this forum for scripts that search and read shortcut links. But if the script finds the wrong one and deletes it, it might make the customer sad if he looses something.
Yeah concerning this prob I imagined it was like you told just I thought there was a way to associate the link to the software installed so that all link associated could be deleted.
Thanks again for helping!
Regards

Originally posted by jtbalogh
[B]For (1) above, I had that problem too. This worked for me, if using the MUI modern interface pages,

Icon "icon-inst.ico"
UninstallIcon "icon-uninst.ico"
!define MUI_ICON "icon-inst.ico"
!define MUI_UNICON "icon-uninst.ico"
You should only use the MUI_ICON and MUI_UNICON settings, the first two lines can be removed.

Originally posted by Joost Verburg
You should only use the MUI_ICON and MUI_UNICON settings, the first two lines can be removed.
Yes, as I understood first lines corresponds to the name of the icon used.
Thanks for support

.


Fulk, this thread has an example to search shortcuts.
http://forums.winamp.com/showthread.php?threadid=231570


Originally posted by jtbalogh
Fulk, this thread has an example to search shortcuts.
http://forums.winamp.com/showthread.php?threadid=231570
Thank you very much :)