To get the installation to work you will need to specify the port aswell. To do this use a property:
<WebSite Id="DefaultWebSite" Description="[TARGETWEBCOMBO]" > <WebAddress Id="AllUnassigned" Port="[TARGETWEBPORT]" /> </WebSite> To get the port of the selected site should be easy when you use this: '=========================================================================== ' This function populates the MSI properties of the specified website '=========================================================================== Function PopulateMSIWebSiteProperties() Dim oIIS, oSite, r ' allow errors On Error Resume Next ' instanciate the IIS object Set oIIS = GetObject("IIS://localhost/W3SVC") ' check if an error occurred: if an error occurs pass the error number back to setup If Err.Number <> 0 Then MsgBox "Unable to open IIS W3SVC Root object - please ensure that IIS is running" & vbCrLf & _ " - Error Details: " & Err.Description & " [Number:" & Hex(Err.Number) & "]", vbCritical, "Error" PopulateMSIWebSiteProperties = ERROR_INSTALL_FAILURE Exit Function Else ' iterate through the sites For Each oSite in oIIS If oSite.Class = "IIsWebServer" Then ' if the description is the same as the specified description, get the details if oSite.ServerComment = Session.Property("TARGETWEBCOMBO")then 'get the properties of the site For Each item in oSite.ServerBindings strServerBinding = item BindingArray = Split(strServerBinding, ":", -1, 1) Session.Property("TARGETWEBPORT") = BindingArray(1) ' only do it for the first serverbinding (there may be more than 1) Exit For Next End If End If Next 'return success to MSI PopulateMSIWebSiteProperties = ERROR_SUCCESS End If 'clean up Set oIIS = Nothing End Function Matthew Rowan wrote: > > I am trying to allow users to select which WebSite they wish to install a > virtual directory under. I have used the method describe here which gives > me > the list however the virtual directory is still installed under the > default > web site since the port of the Web Address is the same. This is my > declaration of the web site as is stated in the WiX help. > > "Nesting WebSite under Product, Fragment, or Module results in a web site > "locator" record being created in the IIsWebSite table. This means that > the > web site itself is neither installed nor uninstalled by the MSI package. > It > does make the database available for referencing from a WebApplication, > WebVirtualDir or WebDir record. This allows an MSI to install > WebApplications, WebVirtualDirs or WebDirs to already existing web sites > on > the machine. The install will fail if the web site does not exist in these > cases." > > <WebSite Id="DefaultWebSite" Description="[TARGETWEBCOMBO]" > > <WebAddress Id="AllUnassigned" Port="80" /> > </WebSite> > > and under a component I reference this Web Site > > <WebVirtualDir Id="VirtualDir" Alias="[P_IIS_VIRTUALDIRECTORY]" > Directory="DirWeb" WebSite="DefaultWebSite"> > <WebApplication Id="WebApp" Name="[P_IIS_VIRTUALDIRECTORY]"> > </WebApplication> > </WebVirtualDir> > > > Any help on what I need to do would be greatly appreciated. > > Regards, > > -Matthew Rowan > > On 2/2/07, carlldev <[EMAIL PROTECTED]> wrote: >> >> >> I found an article somewhere that states that the values in the tables >> that >> were there when the MSI started cannot be removed or updated. >> Removing the Listitem from the Combobox also didn't work because that >> dropped the whole table all together as there are no other comboboxes. >> >> So I figured out 2 ways of doing it: >> 1. Orca >> By editing the MSI with Orca I was able to remove the offending value >> from >> the Combobox table. >> 2. This causes an ICE17 warning but it still compiles >> I removed the combobox Listitems from the combobox I want to populate and >> created a separate combobox with width and height = 0 (to make it >> invisible). I gave this dummy combobox 1 Listitem to force the creation >> of >> the Combobox table. >> >> I also tried doing a create table query to get create the required >> Combobox >> table but can't get it to work The query looks like this: >> CREATE TABLE `ComboBox` (`Property` CHARACTER(72) NOT NULL, `Order` SHORT >> NOT NULL, `Value` CHARACTER(64) NOT NULL, `Text` CHARACTER(64) >> LOCALIZABLE) >> PRIMARY KEY `Property`, `Order` TEMPORARY >> >> if anyone know how to solve this let me know, if only to get the ICE17 >> warnings to go away. >> -- >> View this message in context: >> http://www.nabble.com/Adding-records-to-MSI-on-the-fly-tf3150241.html#a8749870 >> Sent from the wix-users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> Using Tomcat but need to do more? Need to support web services, security? >> Get stuff done quickly with pre-integrated technology to make your job >> easier. >> Download IBM WebSphere Application Server v.1.0.1 based on Apache >> Geronimo >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >> _______________________________________________ >> WiX-users mailing list >> WiX-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wix-users >> > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- View this message in context: http://www.nabble.com/Adding-records-to-MSI-on-the-fly-tf3150241.html#a8882207 Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users