Further to this bug: http://sourceforge.net/tracker/index.php?func=detail&aid=1992202&group_id=105970&atid=642714 it should be possible to set the IIS SiteId to the hash of the site name in the same way that IIS 6 does. (For more details see original bug report).
The algorithm for this is explained here on Mike Poulson's blog: http://blogs.msdn.com/mpoulson/archive/2006/03/06/544893.aspx
scaweb.cpp with IIS 6 site Id hash
Added support for SiteId="*" which will generate the web site id using the same mechanism that IIS would use.
Reopened as I have found a bug.
If I set the site id to "*" I get the following error:
ConfigureIIs: Error 0x80070057: failed to parse record field: 3 as number: *
ConfigureIIs: Error 0x80070057: Failed to get SiteId for Web
ConfigureIIs: Error 0x80070057: failed to read IIsWebSite table
MSI (s) (98!AC) [10:04:42:496]: Product: MPOS Websites Configuration
(1.0.0) -- Error 26002. Failed to read IIsWebSite table. (-2147024809)
If I set the Id to -1 it works as expected.
I have done some more testing and realised what was happening. I am using a property to set the SiteId e.g. SiteId="[MySiteId]". If I change to SiteId="*" it works. I guess this means the formatted value is not being resolved earily enough for the test to change * in to -1.
Added a little more info to help file.
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 21 days (the time period specified by
the administrator of this Tracker).