I have had quite a few requests to have a customer’s icon embedded in their setup program – and not use the default InstallShield one. In the past I have poked around trying to see if there was an “Undocumented” method to do it and just simply gave up after spending a fruitless hour or so.
This time, I was going to try again – it should not be so ridiciously hard!
Damn I’m good!
After searching the forums, one post gave me a glimmer of hope – but not the method I wanted to employ. The poster suggested that you take the final setup.exe and open in a Resource Editor and look at the Icon resource and there make your changes. Well this means you need to alter the setup each time you generated an output file – that wastes my time, plus the setup.exe might be digitally signed – not a good solution. But the germ of an idea was to alter the bootstrap setup.exe.
After searching, performing various test builds, I finally found a solution that works!
- Navigate to the directory “c:\Program Files\InstallShield\2009\Redist\Language Independent\i386″
- Locate the two bootstrap files “setupPreReq.exe” and “setupPreReqW.exe”. Make a copy of them to preserve in case you have problems.
- Open each in a Resource Editor and look at the Icon resource. In my method, I used Visual Studio 2005 and opend a file, selected the icons section, and added a new Icon resource that a customer supplied (a 32 bit .ico file), which became Icon 101 – I had to then delete #100 (the InstallShield default one) and renamed my new Icon from 101 to be 100. I then saved the modified SetupPreReq.Exe and made the same change to the other one. Forgive the improper use of technical terms – I don’t program at all, I am relatively new to the VS IDE!
- Rebuild the application media. Now the new setup will display the customize icon. This works for each and every build!
Now I modified these two files for a project that has quite a few setup prerequisites – hence the ones that worked were named appropriately “setupPreReq.exe” and “setupPreReqW.exe”. There were two other bootstrap setup’s, a “Setup.exe” and “SetupW.exe” but they did not work for my needs – but may be used if you don’t have setup prerequisites. You may need to modify them as well.
For my needs, I will archive the original ones and use to create new customized ones for each customer.
Hope this helps!
Charles