I have a WiX install project that includes IIS setings for virtual directory and application settings with an application pool. After initial install, the customer will change t
I apologize ahead of time for the long answer:
I recommend keeping your Website and Content in two separate features and then giving them the option of supplying any variables needed for installation via UI or command line parameters. If you use the "Remember Property" pattern, then you can recall the variables used when changing or upgrading an installation (read all the way through the last comments, there is a slightly simpler way of doing it).
This allows the person installing the product to set up everything with the given variables or set up the IIS website on their own and install only website content.
This also jives well with MajorUpgrades. I don't currently see upgrade information in code you provided, so you should look into MajorUpgrades vs patches (major upgrades are much easier)
Remember, variables accessed by $(var.name) are used at MSI compile time, whereas public variables accessed via brackets [MY_VARIABLE] are used at install time. Public variables can be exposed through the MSI UI, or provided to msiexec via command line (I use this for silent installs and/or specifying a log file)
Here is a summary of the examples included below:
Configuration.wxi:
REG_WEBSITE_NAME AND (NOT WEBSITE_NAME)
REG_WEB_APP_POOL_NAME AND (NOT WEB_APP_POOL_NAME)
REG_WEB_APP_POOL_IDENTITY_DOMAIN AND (NOT WEB_APP_POOL_IDENTITY_DOMAIN)
REG_WEB_APP_POOL_IDENTITY_USERNAME AND (NOT WEB_APP_POOL_IDENTITY_USERNAME)
REG_WEBSITE_NAME AND (NOT WEBSITE_NAME)
REG_WEB_APP_POOL_NAME AND (NOT WEB_APP_POOL_NAME)
REG_WEB_APP_POOL_IDENTITY_DOMAIN AND (NOT WEB_APP_POOL_IDENTITY_DOMAIN)
REG_WEB_APP_POOL_IDENTITY_USERNAME AND (NOT WEB_APP_POOL_IDENTITY_USERNAME)
Product.wxs:
IISConfiguration.wxs:
UIFlow.wxs:
LicenseAccepted = "1"
1
UIDialogs.wxs: