Can I change the default .exe icon?
Created: 31 Jan 2011 | 7 comments
Im using Wise Installation Studio 7.3.0.250. I want to replace the default icon for the .exe that gets generated for my installer with my own. It also appears in the top left corner of the dialogs during the actual installation process, and also in the taskbar during installation.
Is this possible inside the app? or maybe there is some kind of predefined variable that hopefully I can overwrite somewhere?
nothing i've tried has worked so far. help, please?
Discussion Filed Under:
Comments
There is no provision in the
There is no provision in the stub wrapper that compiles to the EXE to enable you to specify a custom icon.
However, there is a way to get around this which I have just tested, as the standalone Wisescript compiler does allow you to specify an icon.
So open a new Wisescript project, go to the compilation options and specify your choice of icon, then save the WSE. Then open it in a text editor. You will find a line in the WSE file that looks something like this:
Icon Pathname=C:\Program Files (x86)\WinBatch\Icons\TAURUS.ico
This line appears after a line stating: Font Size = 8
Now go back to your MSI project, which you are compiling to an EXE, and go into the PreRequisites menu option. Add a dummy pre-requisite (unless you have specified a pre-req already) such as c:\windows\notepad.exe
This will enable the "Edit Script" button. When you select "Edit Script", the WSE file that forms the EXE wrapper will be saved to your project folder. Now exit out of your WSI and WSE editors and open the newly created WSE in your text editor. Locate the Font Size = 8 line and add the Icon Pathname line immediately after it. Save the modified WSE file. (I use Notepad ++ for editing).
Now re-open your project WSI and go back to the Pre-Requisites section, and remove the dummy pre-requisite. Now compile your project and you should find that the EXE now has the specified icon.
Hope this works for you also.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
sadly it doesnt work, it
sadly it doesnt work, it crashes when compiling the WSI. actually even simply compiling the WSE will crash, where before it worked just fine.
looks like some other option in the WSE isnt liking that new line
I tried it with an empty
I tried it with an empty project using WIS 7 SP2, and an icon file of 48x48 of size 9.89Kb
Make sure you use a proper programmer's editor like Notepad ++ as simple notepad can stick in additional end of line characters which can cause compile errors.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
It works now for the wse. I
It works now for the wse. I was using an icon with different sizes and data types (48x48 32x32 and 16x16 both in 8b and 32b). wse didnt like it that much.
as soon as I started using an icon of only one data type (48 32 and 16 versions of 8b) it worked on the dummy wse, the created exe gets my own icon.
the problem is that for my real wsi project it still isnt working, now there is a delay between the creation of the exe, and the icon actually appearing, but after a few seconds its the default icon the one that makes into the exe.
I already was using a prerequisite (vc++ 2008 redistributable).
Have you checked the EXE to
Have you checked the EXE to see if the default icon is the only one in there, or whether your additional icon is in there also?
Is the path to your 48 x 48 icon correct at compile time? Did you try deleting the original EXE before recompiling? Are you using code signing?
I would also suggest comparing the dummy WSE file with your project WSE file using a text editor to see if there are any other significant differences in the header area.
Failing that, I would suggest looking at some icon editing utilities to see if you can change the icon by direct editing of the EXE.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
It is very important to keep
It is very important to keep the icon size the same as the default used. And when signing the exe file, an even smaller icon must be used (lower resolution), which Wise does automatically if you use internal or external signing. The header file and binary format of the wise executable must be using some ancient technology. It's sad, because since we began signing all our setups, the icons look like something from Windows 3.11.
Johan - thanks for the input
Johan - thanks for the input on the icon sizing. I will feed this back in case the developers have any updates in mind.
If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.
Would you like to reply?
Login or Register to post your comment.