ISWIX, LLC View Christopher Painter's profile on LinkedIn profile for Christopher Painter at Stack Overflow, Q&A for professional and enthusiast programmers

Thursday, April 17, 2008

ComponentID GUID Sloppiness Observation

Brent Rockwood recently made a comment on the WiX-Users List:

Last night I fixed a bug in my installer where I had accidentally duplicated GUIDs on two different components. Luckily I caught this before we ship, but if I had missed it, it would obviously have been a big problem. Is there any good reason that the compiler/linker should not warn about this? It's pretty tricky to spot and Google tells me it's a pretty common error.


It seems that Brent isn't running validation as this problem would have been easily identified. Judging from what Brent reports, many people using WiX aren't running validation either. In InstallShield this usually isn't a problem because when you author a component it automatically generates the GUID for you. But WiX is writing installs in notepad/vi/intellisense and there is no automatic GUID generator so developers do what developers do:

Copy and Paste

But component rule sloppiness was raised to a all time high in my mind when I ran validation against wixedit-0.6.1762.msi. An ICE08 error popped up ( among others ) telling me that there was a component rule violation. A quick look at the Component table showed just how bad it was. About half of the ComponentId's were manually generated using a less then statistically unique algorithm:

WixBinaries.2.0.lib {DEADBEEF-DEAD-BEEF-DEAD-BEEFDEAD3010}
WixBinaries.2.0.doc {DEADBEEF-DEAD-BEEF-DEAD-BEEFDEAD3009}
WixBinaries.3.0.doc {DEADBEEF-DEAD-BEEF-DEAD-BEEFDEAD3009}
Templates.UISample {DEADBEEF-DEAD-BEEF-DEAD-BEEFDEAD0014}

Wow, I'm not sure what to say. It would be bad enough if this was some random setup developer, but this is coming from a developer who is writing their own setup developer tools and trying to convince the world that they have a better mouse trap.

I frequently get anonymous comments on my blog talking about how great WiXEdit is and that it's `Free`. Well all I can say is WiXedit may be free but this observation is Priceless!

3 comments:

  1. Sounds like a case where either a better front end, or better backend build support would have made life a lot easier. If only WiX were willing to auto-generate component guids in common cases, this and the ????????????-????-????-????-???????? convention would be unnecessary.

    ReplyDelete
  2. Component/@Guid="*"

    ReplyDelete
  3. Hi this is very nice compounent id guid this site is very nice.

    ReplyDelete