Archive: Installer with no icon


Installer with no icon
Hey all,

How can I make an installer without an icon, because NSIS adds a default icon when the script dont specify one.

I would like no icon at all, just let windows show the default exe icon for the installer.

Thanks :)


I am sorry, you are saying you don't want an icon and then you end the question with 'show the default icon'? Which is it? Do you want an icon or not?


I suspect he wants an icon, but he wants it to be the icon as seen for an executable that has no icon resource itself.
If this is the case, Backland, just get a copy of that icon in .ico format and specify that as the icon.


Ah, yeah, ok, if that is it, do what Animaether says :)


Sorry, yes I meant the default windows icon for executables which Windows disaplays when there is none set in the actual exe.

I could just copy that icon and set it in my installer, but another user may have specified something different as their exe file icon in Windows settings, any other way to get an icon-less installer?


not seeing any


Not sure if it will work, but you could try to remove the icon from the installer with tool like Resource Hacker. Just add "CRCCheck off" in your script so you don't get CRC error when you run the installer.

Edit: I tried it and it works. :)


Turning CRCCheck off is not good thing.
Look at !packhdr command. With it you can invoke ResourceHacker whithin your script to remove icon from installer stub.
Read ResourceHacker help for commandline options.


!packhdr with ResourceHacker should just work well, i'm using it to add a 2nd icon to the installer. i'm wondering though how windows treats an exe without icon. will it display that empty window icon?


yes, it displays the empty window icon, flat if it's small, the fancy angled+shaded one if it's big (XP anyway).


Yes !packhdr is definitely the right way to go. :)

!packhdr "exehead.tmp" '"C:\Program Files\ResHack\ResHacker.exe" -delete exehead.tmp, exehead.tmp, icongroup,103,'

That should do the trick.


Thanks for the help guys. :)

I was wondering how difficult it would be to add such a functionality to NSIS itself?


You just need to put that code into your script.

-Stu


very nice and clean solution, i like it :)
thus posted in the wiki:
http://nsis.sourceforge.net/Installe...Icon_Ressource
:)