Background: I have a Wix installer where a virtual directory is created on an existing IIS website. A virtual directory is created (it does not exist before installation), but the IIS website must already be created (the user simply selects the site to install in the ListBox).
Problem: when deleting, the physical path on the IIS website that was installed becomes empty, there is no value for this attribute. Below is the version of my main wix file. I'm not sure why removal affects the IIS site, but any thoughts are appreciated.
Notes: I'm on Wix 3.5 and Windows Server 2008 R2, IIS 7.
<Product> <Property Id='WEBSITE_DESCRIPTION'> <RegistrySearch Id='RememberPropertyWEBSITE_DESCRIPTION' Root='HKCU' Key='SOFTWARE\Company\Product' Name='InstalledWebsiteDescription' Type='raw' /> </Property> <Property Id='WEBSITE_PORT'> <RegistrySearch Id='RememberPropertyWEBSITE_PORT' Root='HKCU' Key='SOFTWARE\Company\Product' Name='InstalledWebsitePort' Type='raw' /> </Property> <Component Id='PropertiesToSave' Directory='ApplicationFolder'> <RegistryValue Root='HKCU' Key='SOFTWARE\Company\Product' Name='InstalledWebsiteDescription' Value='[WEBSITE_DESCRIPTION]' Type='string' /> <RegistryValue Root='HKCU' Key='SOFTWARE\Company\Product' Name='InstalledWebsitePort' Value='[WEBSITE_PORT]' Type='string' /> <RemoveFolder Id='CleanupApplicationFolder' On='uninstall' /> </Component> <Directory Id='TARGETDIR' Name='SourceDir'> <Component Id='TestWebVirtualDirComponent' Guid='12345678-6304-410E-A808-E3585379EADB'> <CreateFolder /> <iis:WebVirtualDir Id='TestWebVirtualDir' Alias='[WEBSITE_VIRTUALDIR]' Directory='TARGETDIR' WebSite='MyWebsite'> <iis:WebApplication Id='TestWebApplication' Name='Test' /> </iis:WebVirtualDir> </Component> </Directory> <iis:WebSite Id="MyWebsite" Description="[WEBSITE_DESCRIPTION]" SiteId="*"> <iis:WebAddress Id="AllUnassigned" Port="[WEBSITE_PORT]" /> </iis:WebSite> <Feature> <ComponentRef Id='TestWebVirtualDirComponent'/> <ComponentRef Id='PropertiesToSave'/> </Feature> </Product>
Nick canzoneri
source share