I have a Wix installed which creates a virtual directory in IIS via the following:
<DirectoryRef Id="INSTALLLOCATION">
<Component Id="VirtualDirectory" Guid="29BEECCC-AA5F-11DF-BBB1-9C0AE0D72085">
<iis:WebVirtualDir Id="MyVDir" Directory="INSTALLLOCATION" Alias="MyVDir" WebSite="DefaultWebSite">
<iis:WebApplication Id="MyApplication" Name="MyVDir" />
</iis:WebVirtualDir>
<CreateFolder />
</Component>
</DirectoryRef>
<iis:WebSite Id="DefaultWebSite" Description="Default Web Site">
<iis:WebAddress Id="AllUnassigned" Port="80" />
</iis:WebSite>
However this fails if the bindings for port 80 have been removed for that web site.
The <iis:WebAddress />
element and Port
attributes are both mandatory, however completely superfluous in this case - I don't care what the Port of the web site is, as long as it creates my virtual directory!
Is there any way of getting the above installer to successfully create a virtual directory without prompting the user for a port number?