1

I'm learning how to use WiX toolset to create an MSI file. The tutorial that I'm reading guides to using BMP files to customize the default dialogs. I tried here using a PNG file, and it seems to be working fine. Also, I found that using Bitmaps with transparency (which is not part of the original BMP specification) would work fine too.

<WixVariable Id="WixUIDialogBmp" Value="Assets\dialog.png" />

Is this a limitation of an older version of Microsoft Installer or Windows?

Here is the PNG file that I'm using.

enter image description here

Here is there installer running.

enter image description here

Note: I'm using Windows 10 with Windows Installer 5.0.16299.15.

Vinicius Rocha
  • 4,023
  • 4
  • 29
  • 38
  • 1
    As far as I understand the text it is about making the checkbox transparent and not about the image. – NielsNet Apr 11 '18 at 15:22
  • @NielsNet you are 100% correct, but the reason why we want to make the checkbox transparent is because **standard** bitmaps don't support transparency, preventing us from just setting the background to part of the window and leaving the rest using the system color, which is that same as the checkbox background. I think, but I'm not sure. – Vinicius Rocha Apr 11 '18 at 16:05
  • @NielsNet I decided to remove the reference to the checkbox issue and keep the focus on the original question. Thanks for raising that. – Vinicius Rocha Apr 11 '18 at 16:56

2 Answers2

3

Yes, PNG support is "new" for Windows 8, per the MSDN SDK:

Windows 8 and Windows Server 2012: The image file can be in any standard format supported by the Windows Imaging Component (WIC), including TIFF, JPEG, PNG, GIF, BMP, and HDPhoto. The control does not support animation.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
  • 1
    I don't think that SDK page is totally complete. Another page says PNG was in Win7 and Wikipedia says Vista. Another article says WIC was added to XP prior to SP3 and rolled up into SP3. I know I've been using PNGs in my installers long before Windows 8. – Christopher Painter Apr 11 '18 at 19:54
  • 2
    Either way I'm too lazy to build a VM to find out. ;) – Christopher Painter Apr 11 '18 at 19:55
  • 1
    It was painful but I managed to install XP and do a test. The PNGs weren't rendered and SP3 did already have a newer version of WIC. I also tested Win7 and it didn't render. So the doco is actually correct in that it requires Win8. This seems silly to me. Having MSI 5.0 and WIC components installed should be enough. It shouldn't matter if I'm running on win7/8/10 and it prevents people from using the new feature because they want their install to work on win7. Way to go windows installer team. I wish I could say I was supprised (example hyperlink control) – Christopher Painter Apr 12 '18 at 12:09
1

I believe it's just a legacy limitation and the documentation was never updated. Probably technically falls in the unsupported category if you somehow ever needed to open a ticket with MSFT PSS.

I suspect under the hood MSI supports whatever native codecs are installed on the machine by WIC. YMMV may very on some old unpatched installation of XP or something. I wouldn't worry about it.

MSI UI is kinda old and crappy. If it does what you need then use it. Otherwise create a bootstrapper or external ui handler. One tip for transparency and nativeUI is to use pushbuttons instead of radio controls. Things like that will help. Look at what other installers do for examples.

https://msdn.microsoft.com/en-us/library/windows/desktop/ee719654(v=vs.85).aspx

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100