How icons work in Windows Explorer:
On Windows, the icon is associated with the file extension. For example, if you 
look in the registry, under HKEY_CLASSES_ROOT, you'll see a key named ".msi". 
This has a key under it called "Msi.Package". If you follow this key to 
HKEY_CLASSES_ROOT\Msi.Package, you'll find another key named "DefaultIcon", 
which refers to "C:\Windows\system32\msiexec.exe,0". This setting controls the 
icon for *all* MSI files. (This is on Windows Vista, it might be slightly 
different on other versions of Windows).
Because it controls the icon that is displayed for *all* MSI files, you *should 
not change it*.
EXE files are special. If you follow the same sequence of steps for 
HKEY_CLASSES_ROOT\.exe, you'll find that DefaultIcon is set to "%1". This means 
the EXE file itself. Fortunately, Windows knows how to extract icons from EXE 
files, so this just works. You can't do the same for most other file types 
(including MSI files) because Windows doesn't know how to extract icons from 
them.
Other file types are even more special: they are associated with a custom icon 
handler which implements the IExtractIcon interface. You can spot these in the 
registry because they've got an "IconHandler" key. See, for example, 
HKCR\VisualStudio.Launcher.sln\ShellEx\IconHandler, which is responsible for 
putting the "7.0", "7.1", "8.0" or "9.0" tags on the icons for your .SLN files. 
See http://msdn2.microsoft.com/en-us/library/bb776857.aspx for more information 
on writing your own icon handler.
So, to recap: you could change the icon of ALL MSI files, but you shouldn't do 
this (and how are you going to do it without an installer to change that 
registry key, anyway?).
You could change the icon of a specific MSI file by implementing a custom icon 
handler for MSI files (but there's no convention that says which binary from 
the MSI should be used, so it'd only work for your MSI files, and you'll need 
to write a custom COM object, and install that COM object).
So, dB. is completely correct. You'll need to use a bootstrapper EXE with its 
own icon.
Cheers,
Roger.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dB.
Sent: 27 April 2008 16:13
To: Riyaz Mogharabin; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] MSI with an icon?

I don't think you can change the icon of the MSI, but if you package the 
product in a bootstrapper, you can change the icon of the latter (since it's a 
plain .exe). Various bootstrappers have different ways of specifying icons, I 
didn't see an option in the one with wix 3 (setupbld / setup.exe)  to do that, 
but there're plenty of executable icon changers, just google "executable change 
icon".
-dB.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Riyaz Mogharabin
Sent: Monday, April 21, 2008 7:18 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] MSI with an icon?

Dear Alexander,
The question is exactly what you've mentioned. I need to change the icon of 
created MSI file into the Logo of the company, but I haven't found the solution 
yet. I have searched for the registry key you stated, but I couldn't find the 
path in my system registry.
Does anybody know the solution? Surely there must be a way to do that in the 
wix. It is full of new ideas...
Thank you very much.



> Date: Thu, 10 Apr 2008 11:16:00 -0700
> From: Alexander Shevchuk <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
> Subject: Re: [WiX-users] MSI with an icon?
> To: "wix-users@lists.sourceforge.net<mailto:wix-users@lists.sourceforge.net>"
>   <wix-users@lists.sourceforge.net<mailto:wix-users@lists.sourceforge.net>>
> Message-ID:
>   <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
>
> Content-Type: text/plain; charset="us-ASCII"
>
> Hi Constantin,
>
> Here is the original question:
>
> "How can we create a setup file which already has an icon? ..."
>
> Because question is not very specific I assume we are talking about an msi 
> file.
>
> As far as I know, icon for any msi file comes from 
> HKEY_CLASSES_ROOT\Msi.Package\DefaultIcon which points to 
> "C:\Windows\system32\msiexec.exe,0".  I am not aware > of any other way to 
> override that icon with some other icon on *per-msi basis* and I don't think 
> that overriding default value in the registry on per-machine basis is the 
> right > > > > solution.  If you know how to change the icon of a specific msi 
> file, please share it with everybody.  I personally would like to know that.
>
> Regards,
>
> Alex



[cid:image001.gif@01C8A897.67964AD0]<http://www.incredimail.com/index.asp?id=99431>

________________________________

1E can save a company with 10,000 PCs over $165,000 and 1,381 tons of CO2 
emissions per annum. Calculate what you can save with the award winning 
NightWatchman from 1E. Discover the benefits of System Center solutions for 
yourself - attend an exclusive 1E Enterprise Solutions Road Show. Visit our 
website at http://www.1e.com

DISCLAIMER: This is a PRIVATE message. If you are not the intended recipient, 
please delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to bind 1E 
Ltd to any order or other contract unless pursuant to explicit written 
agreement or government initiative expressly permitting the use of e-mail for 
such purpose

<<inline: image001.gif>>

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to