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

Reply via email to