Neil,
thanks for the warning, I would have fallen into that trap sooner or later.
So I changed my port determining script. It now iterates over all metabase 
objects on the same level as the websites and chooses the first website it 
finds. The script now looks as follows:

'sets DEFAULT_WEBSITE_PORT to port number of first IIS website found (usually 
there is just one, and in 
'most cases it goes by the name "1", but that's not always the case, e.g. if 
the default website gets 
'deleted and recreated
Option Explicit
Function Main()
  Dim objSRV, objSITE
  Set objSRV = GetObject("IIS://LOCALHOST/W3SVC")
  For Each objSITE In objSRV
    If objSITE.class = "IIsWebServer" Then    
      Session.Property("DEFAULT_WEBSITE_PORT") = 
Replace(objSITE.GetEx("ServerBindings")(0), ":", "")
      Exit For
    End If
  Next
End Function

José

>  From: Neil Sleightholm <[EMAIL PROTECTED]> - 2008-07-31 16:45
>  A word of warning, on Windows 2003 the default site might not be at ID 1 and 
>  "IIS://localhost/W3SVC/1" would fail. It is when you initially install but 
> if you where to delete the
>  default and recreate it it would have an ID that is a hash of the name.

>  Neil
-- 




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to