InstallShield Tips and Techniques

June 15, 2009

Altering setup.exe to embed customized icon

Filed under: Reference Materials — shieldmaster @ 11:27 pm

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! 

  1.  Navigate to the directory “c:\Program Files\InstallShield\2009\Redist\Language Independent\i386″
  2. Locate the two bootstrap files “setupPreReq.exe” and “setupPreReqW.exe”.  Make a copy of them to preserve in case you have problems.
  3. 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!
  4. 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

2 Comments »

  1. Hi ShieldMaster,
    I hope you may help to me.How can I change the text color and size in install script [install shield project]? I want to change message[szMsg] color and size in the welcome dialog box[SdWelcome]. Message is a warning message to grab the user attention so I am willing to to red and bold ?

    Is this possible ?

    Comment by Thillakan — August 26, 2009 @ 6:52 pm

    • I specialize in Basic MSI Projects which allows you quite a latitude in dealing with dialogs. Unfortunately that dialog is one of the basic ones that is contained within the engine DLL – you can’t modify. The nice thing about Basic MSI Projects is that its so easy to create you own replica of the Message Box and put all of you specific formatting.

      As for InstallScript MSI projects, it has been a while and I am not the one to be able to assist. I remember you had to modify the _ISUserDLL.dll with a resouce editor. Review the Acresso KB website and look for the technique.
      ShieldMaster

      Comment by shieldmaster — August 26, 2009 @ 10:38 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.