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 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of "José Diaz Seng" Sent: 31 July 2008 10:06 To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Determining the port number of the default IIS website Hi, I solved my problem as follows, maybe it is of use to someone else, too: As described in the WiX wiki, I check for the availability of the scripting host (see http://www.wixwiki.com/index.php?title=VBScript_Tutorial). A custom action then takes care of setting the port number property: <!-- Determine port of default IIS website --> <CustomAction Id="DetermineDefaultWebSitePort" Return="check" BinaryKey="DefaultWebSitePortVbs" VBScriptCall="Main" /> <Binary Id="DefaultWebSitePortVbs" SourceFile="read_port_IIS_defaultWebsite.vbs" /> <InstallUISequence> <Custom Action="DetermineDefaultWebSitePort" After="AppSearch" /> </InstallUISequence> <iis:WebSite Id="DefaultWebSite" Description="Default website for our web app"> <iis:WebAddress Id="AllUnassigned" Port="[DEFAULT_WEBSITE_PORT]" /> </iis:WebSite> The VBScript file looks as follows: Option Explicit Function Main() Session.Property("DEFAULT_WEBSITE_PORT") = Replace(GetObject("IIS://localhost/W3SVC/1").GetEx("ServerBindings")(0), ":", "") End Function Cheers José -- ------------------------------------------------------------------------- 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 ------------------------------------------------------------------------- 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