I have figured it out. I created 2 of the 3 components by copying an existing component, and failed to update the ElementId in the copied components to reference the correct elements.
A -----Original Message----- From: Amy Rosewater [mailto:arosewa...@spectrumhr.com] Sent: Thursday, July 29, 2010 1:23 PM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] Problem using XmlConfig to configure IIS7 Hi All, I am using using wix v 3.0.5419.0. I have written components for installing on Windows 2008 to configure IIS by using the XmlConfig and XmlFile wix custom actions. In my file I have three components to do similar things, one for when the install is creating the user to be used for the application pool identity, one for when the install is using an existing domain user, and one for when the install is setting the IdentityType to "NetworkService". My problem is when I run an install, it seems to select the correct component for installation based on the conditions for each component (in the info from my log it should have selected TRANS_ConfigureIIS7Shared), but when the xml is written into the applicationHost.config file, it uses the value "NetworkService" from the TRANS_ConfigureIIS7SharedNetworkService component that is not selected to place in the "IdentityType" attribute value. It ALSO writes the "userName" and "password" attributes into the xml which are not in the TRANS_ConfigureIIS7SharedNetworkService component but sets the "IdentityType" attribute value to "NetworkService". Any ideas? My log showing that the correct component is being selected: MSI (s) (7C:D0) [12:32:18:715]: Component: TRANS_ConfigureIIS7Shared; Installed: Absent; Request: Local; Action: Local; Client State: Unknown MSI (s) (7C:D0) [12:32:18:715]: Component: TRANS_ConfigureIIS7SharedExistingUser; Installed: Absent; Request: Local; Action: Null; Client State: Unknown MSI (s) (7C:D0) [12:32:18:715]: Component: TRANS_ConfigureIIS7SharedNetworkService; Installed: Absent; Request: Local; Action: Null; Client State: Unknown Below is the wxs in question: <Component Id="TRANS_ConfigureIIS7Shared" Guid="6A12006D-5DB8-485F-8BD6-B49F09B29CD6"> <Condition><![CDATA[(IISMJRVRSN="#7") AND (IISUSEWINDOWSAUTHENTICATION<>"checked") AND (USEEXISTINGUSER<>"checked")]]></Condition> <!--Because the IIS Components don't work with IIS7, this component creates shared xml nodes in IIS7 config--> <!--Create the app pool node on install--> <util:XmlConfig Id="APCreateAppPoolNode" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]" Name="add" Node="element" Sequence="1" On="install" /> <util:XmlConfig Id="APAddAppPoolNameAttr" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateAppPoolNode" Name="name" Value="[IISAPPPOOLNAME]" Sequence="2" /> <util:XmlConfig Id="APAddAppPoolAutoStartAttr" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateAppPoolNode" Name="autoStart" Value="true" Sequence="3" /> <util:XmlConfig Id="APAddAppPoolManagedPipelineModeAttr" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateAppPoolNode" Name="managedPipelineMode" Value="Classic" Sequence="4" /> <util:XmlConfig Id="APCreateProcessModelNode" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/processModel" Name="processModel" Node="element" Sequence="5" On="install" /> <util:XmlConfig Id="APAddIdentityTypeAttr" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="identityType" Value="SpecificUser" Sequence="6" /> <util:XmlConfig Id="APAddUserNameAttr" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="userName" Value="[APPLICATIONUSER]" Sequence="7" /> <util:XmlConfig Id="APAddPasswordAttr" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="password" Value="[APPLICATIONPASSWORD]" Sequence="8" /> <util:XmlConfig Id="APAddIdleTimeoutAttr" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="idleTimeout" Value="00:00:00" Sequence="9" /> <util:XmlConfig Id="APCreateRecyclingNode" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling" Name="recycling" Node="element" Sequence="10" On="install"/> <util:XmlConfig Id="APCreatePeriodicRestartNode" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]/recycling" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart" Name="periodicRestart" Node="element" Sequence="11" On="install" /> <util:XmlConfig Id="APAddPeriodicRestartTimeAttr" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreatePeriodicRestartNode" Name="time" Value="00:00:00" Sequence="12" /> <util:XmlConfig Id="APCreateScheduleNode" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart/schedule" Name="schedule" Node="element" Sequence="13" On="install" /> <util:XmlConfig Id="APCreateScheduleClearNode" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart/schedule" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart/schedule/clear " Name="clear" Node="element" Sequence="14" On="install" /> <!--Delete the app pool node on uninstall--> <util:XmlConfig Id="APDeleteAppPoolNode" File="[IISINSTALLPATH]config\applicationHost.config" Action="delete" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]" ElementPath="//configuration/system.applicationHost/applicationPools" Node="element" Sequence="1" On="uninstall" /> </Component> <Component Id="TRANS_ConfigureIIS7SharedExistingUser" Guid="4C058138-CFAA-4E68-AF42-37301C85DD8B"> <Condition><![CDATA[(IISMJRVRSN="#7") AND (IISUSEWINDOWSAUTHENTICATION<>"checked") AND (USEEXISTINGUSER="checked")]]></Condition> <!--Because the IIS Components don't work with IIS7, this component creates shared xml nodes in IIS7 config--> <!--Create the app pool node on install--> <util:XmlConfig Id="APCreateAppPoolNodeEU" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]" Name="add" Node="element" Sequence="1" On="install" /> <util:XmlConfig Id="APAddAppPoolNameAttrEU" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateAppPoolNode" Name="name" Value="[IISAPPPOOLNAME]" Sequence="2" /> <util:XmlConfig Id="APAddAppPoolAutoStartAttrEU" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateAppPoolNode" Name="autoStart" Value="true" Sequence="3" /> <util:XmlConfig Id="APAddAppPoolManagedPipelineModeAttrEU" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateAppPoolNode" Name="managedPipelineMode" Value="Classic" Sequence="4" /> <util:XmlConfig Id="APCreateProcessModelNodeEU" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/processModel" Name="processModel" Node="element" Sequence="5" On="install" /> <util:XmlConfig Id="APAddIdentityTypeAttrEU" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="identityType" Value="SpecificUser" Sequence="6" /> <util:XmlConfig Id="APAddUserNameAttrEU" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="userName" Value="[IISDOMAINUSER]" Sequence="7" /> <util:XmlConfig Id="APAddPasswordAttrEU" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="password" Value="[APPLICATIONPASSWORD]" Sequence="8" /> <util:XmlConfig Id="APAddIdleTimeoutAttrEU" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="idleTimeout" Value="00:00:00" Sequence="9" /> <util:XmlConfig Id="APCreateRecyclingNodeEU" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling" Name="recycling" Node="element" Sequence="10" On="install" /> <util:XmlConfig Id="APCreatePeriodicRestartNodeEU" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]/recycling" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart" Name="periodicRestart" Node="element" Sequence="11" On="install" /> <util:XmlConfig Id="APAddPeriodicRestartTimeAttrEU" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreatePeriodicRestartNode" Name="time" Value="00:00:00" Sequence="12" /> <util:XmlConfig Id="APCreateScheduleNodeEU" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart/schedule" Name="schedule" Node="element" Sequence="13" On="install" /> <util:XmlConfig Id="APCreateScheduleClearNodeEU" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart/schedule" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart/schedule/clear " Name="clear" Node="element" Sequence="14" On="install" /> <!--Delete the app pool node on uninstall--> <util:XmlConfig Id="APDeleteAppPoolNodeEU" File="[IISINSTALLPATH]config\applicationHost.config" Action="delete" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]" ElementPath="//configuration/system.applicationHost/applicationPools" Node="element" Sequence="1" On="uninstall" /> </Component> <Component Id="TRANS_ConfigureIIS7SharedNetworkService" Guid="D295CA23-D599-4220-A71D-A99964818015"> <Condition><![CDATA[(IISMJRVRSN="#7") AND (IISUSEWINDOWSAUTHENTICATION="checked")]]></Condition> <!--Because the IIS Components don't work with IIS7, this component creates shared xml nodes in IIS7 config--> <!--Create the app pool node on install--> <util:XmlConfig Id="APCreateAppPoolNodeNS" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]" Name="add" Node="element" Sequence="1" On="install" /> <util:XmlConfig Id="APAddAppPoolNameAttrNS" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateAppPoolNode" Name="name" Value="[IISAPPPOOLNAME]" Sequence="2" /> <util:XmlConfig Id="APAddAppPoolAutoStartAttrNS" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateAppPoolNode" Name="autoStart" Value="true" Sequence="3" /> <util:XmlConfig Id="APAddAppPoolManagedPipelineModeAttrNS" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateAppPoolNode" Name="managedPipelineMode" Value="Classic" Sequence="4" /> <util:XmlConfig Id="APCreateProcessModelNodeNS" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/processModel" Name="processModel" Node="element" Sequence="5" On="install" /> <util:XmlConfig Id="APAddIdentityTypeAttrNS" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="identityType" Value="NetworkService" Sequence="6" /> <util:XmlConfig Id="APAddIdleTimeoutAttrNS" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreateProcessModelNode" Name="idleTimeout" Value="00:00:00" Sequence="7" /> <util:XmlConfig Id="APCreateRecyclingNodeNS" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling" Name="recycling" Node="element" Sequence="8" On="install" /> <util:XmlConfig Id="APCreatePeriodicRestartNodeNS" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]/recycling" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart" Name="periodicRestart" Node="element" Sequence="9" On="install" /> <util:XmlConfig Id="APAddPeriodicRestartTimeAttrNS" File="[IISINSTALLPATH]config\applicationHost.config" ElementId="APCreatePeriodicRestartNode" Name="time" Value="00:00:00" Sequence="10" /> <util:XmlConfig Id="APCreateScheduleNodeNS" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart/schedule" Name="schedule" Node="element" Sequence="11" On="install" /> <util:XmlConfig Id="APCreateScheduleClearNodeNS" File="[IISINSTALLPATH]config\applicationHost.config" Action="create" ElementPath="//configuration/system.applicationHost/applicationPools/add [...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart/schedule" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]/recycling/periodicRestart/schedule/clear " Name="clear" Node="element" Sequence="12" On="install" /> <!--Delete the app pool node on uninstall--> <util:XmlConfig Id="APDeleteAppPoolNodeNS" File="[IISINSTALLPATH]config\applicationHost.config" Action="delete" VerifyPath="//configuration/system.applicationHost/applicationPools/add[ \...@name='[IISAPPPOOLNAME]'[\]]" ElementPath="//configuration/system.applicationHost/applicationPools" Node="element" Sequence="1" On="uninstall" /> </Component> Xml that was output: <add name="iV552DBTestingAppPool" autoStart="true" managedPipelineMode="Classic"> <processModel identityType="NetworkService" userName="PETER\iV552DBTesting_IIS" password="[enc:IISWASOnlyAesProvider:cslLY3W7NiWbHqrWRkLJ0Jmpg2E2v0cSq8c 3Y71gcTnlv0Elo+3UOH0SIylKcOnB:enc]" idleTimeout="00:00:00" /> <recycling> <periodicRestart time="00:00:00"> <schedule> <clear /> </schedule> </periodicRestart> </recycling> </add> Amy Rosewater VanMatre SPECTRUM Human Resource Systems Corporation 707 17th Street Suite 3800 Denver CO, 80202 303.592.3403 arosewa...@spectrumhr.com ------------------------------------------------------------------------ ------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users