Old 16th September 2006, 17:27   #1
Backland
Senior Member
 
Join Date: Sep 2006
Posts: 150
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
Backland is offline   Reply With Quote
Old 16th September 2006, 18:45   #2
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
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?
CrushBug is offline   Reply With Quote
Old 16th September 2006, 19:36   #3
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
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.
Animaether is offline   Reply With Quote
Old 17th September 2006, 00:08   #4
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
Ah, yeah, ok, if that is it, do what Animaether says
CrushBug is offline   Reply With Quote
Old 17th September 2006, 07:27   #5
Backland
Senior Member
 
Join Date: Sep 2006
Posts: 150
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?
Backland is offline   Reply With Quote
Old 17th September 2006, 08:24   #6
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
not seeing any
Animaether is offline   Reply With Quote
Old 17th September 2006, 09:11   #7
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
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.

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 17th September 2006, 10:56   #8
v-tal
Junior Member
 
Join Date: May 2002
Location: Belarus
Posts: 5
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.
v-tal is offline   Reply With Quote
Old 17th September 2006, 11:14   #9
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,363
!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?
Yathosho is offline   Reply With Quote
Old 17th September 2006, 11:26   #10
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
yes, it displays the empty window icon, flat if it's small, the fancy angled+shaded one if it's big (XP anyway).
Animaether is offline   Reply With Quote
Old 17th September 2006, 11:33   #11
{_trueparuex^}
Senior Member
 
{_trueparuex^}'s Avatar
 
Join Date: Dec 2005
Location: Glow
Posts: 285
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.

The guy with the ridiculous username. Thou shall call him PaR instead.
Visit My Website
{_trueparuex^} is offline   Reply With Quote
Old 17th September 2006, 12:37   #12
Backland
Senior Member
 
Join Date: Sep 2006
Posts: 150
Thanks for the help guys.

I was wondering how difficult it would be to add such a functionality to NSIS itself?
Backland is offline   Reply With Quote
Old 17th September 2006, 16:00   #13
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You just need to put that code into your script.

-Stu
Afrow UK is offline   Reply With Quote
Old 17th September 2006, 19:11   #14
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
very nice and clean solution, i like it
thus posted in the wiki:
http://nsis.sourceforge.net/Installe...Icon_Ressource
Comm@nder21 is offline   Reply With Quote
Old 13th June 2019, 16:35   #15
prai1
Junior Member
 
Join Date: Jun 2019
Posts: 1
Still won't work

Hey the !packhdr command isn't working for me...

I have copy pasted the same command and it gives an error "Cannot find exehead.tmp file". I have tried various permutations and combinations but the default nsis icon still exists. Can anyone help me out?
prai1 is offline   Reply With Quote
Old 13th June 2019, 17:27   #16
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,163
Who prints this message? NSIS or Resource Hacker?

Maybe the new Resource Hacker version have changed their command line syntax?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump