Many months ago, Mike did a lot of clean up to remove unnecessary dependencies causing more custom actions to be included in MSI packages than should have been. That fix caused the SchedXmlConfig to move to its most natural position, after InstallFiles.
The action should be overridable, so you can specificy an @Before or @After attribute to move it if you need it after a specific action. On Sun, Jan 2, 2011 at 4:19 AM, Neil Sleightholm <n...@x2systems.com> wrote: > I think the problem is that SchedXmlConfig now happens before ConfigureIIs > so that the config file hasn't be updated by the time you try to write to > it. > > I tried scheduling SchedXmlConfig after ConfigureIIs but got a different > error but am not sure why. > > Does anyone know why the scheduling of SchedXmlConfig and ConfigureIIs has > changed? > > Neil > > -----Original Message----- > From: Zhisheng Huang [mailto:zhhuang5...@yahoo.com] > Sent: 01 January 2011 20:30 > To: General discussion for Windows Installer XML toolset. > Subject: -----SPAM----- Re: [WiX-users] problem with XmlConfig when > migrating from Wix 3.0 to Wix 3.5 > > Looks like attachment does not work properly. Here are the two files that > can repro the problem. > > Product.wxs > <?xml version="1.0" encoding="UTF-8"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" > xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" > xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"> > <Product Id="3ab50111-a8a8-4c7c-bdba-1646a67df6bc" Name="SetupProject" > Language="1033" Version="1.0.0.0" Manufacturer="SetupProject" > UpgradeCode="c5b0350c-7e6e-4d4e-9fd2-f3a868429a46"> > <Package InstallerVersion="200" Compressed="yes" /> > <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> > <Directory Id="TARGETDIR" Name="SourceDir"> > <Directory Id="ProgramFilesFolder"> > <Directory Id="INSTALLLOCATION" Name="SetupProject"> > </Directory> > </Directory> > </Directory> > <CustomAction Id="SetApplicationHostFilePath" > Property="ApplicationHostFilePath" > Value="[WindowsFolder]System32\inetsrv\config\applicationHost.config" /> > <?define MySiteSiteName = "Default Web Site/MySite"?> > <?define MySiteWebServerXPath = > > /configuration/location[...@path="$(var.MySiteSiteName)"[\]]/system.webServer?> > <?define MySiteHttpRedirectionXPath = > $(var.MySiteWebServerXPath)/httpRedirect?> > <?define MySiteAddHttpRedirectionXPath = > $(var.MySiteHttpRedirectionXPath)/add?> > <?define MySiteHttpRedirectDestination = /MySite/App.aspx?> > <?define MySiteAddHttpRedirectionVerifyPath = > $(var.MySiteAddHttpRedirectionXPath)[...@destination="$(var.MySiteHttpRedirectDestination)"[\]]?> > > <?define MySiteRemoveHttpRedirectionXPath = > $(var.MySiteHttpRedirectionXPath)/remove?> > <?define WebServiceName = "MySite"?> > <?define VirtualDirDirectory = "d_Site" ?> > <?define WebServiceComponentGuid = > "f644efc9-ace2-49f1-8258-ff614c3c8e32"?> > <?include WebServiceSetup.wxi?> > <DirectoryRef Id="INSTALLLOCATION" > > <!--Step 2: define the directory that will contain the file > layout --> > <Directory Id="d_Site" Name="Site"> > <Component Id="c_MySiteConsoleRedirect" > Guid="e83435c4-dea1-4791-abf6-57035a06e123"> > <CreateFolder /> > <util:XmlConfig > Id="MySiteConsoleRedirectWebServerRedirect" > On="install" > Action="create" > Sequence="1" > File="[ApplicationHostFilePath]" > ElementPath="$(var.MySiteWebServerXPath)" > Name="httpRedirect" > Node="element" > VerifyPath="$(var.MySiteHttpRedirectionXPath)"/> > <util:XmlConfig > Id='MySiteConsoleRedirectWebServerRedirectValue' > ElementId='MySiteConsoleRedirectWebServerRedirect' > Sequence='2' > File='[ApplicationHostFilePath]' > Name="enabled" > Value="true"/> > <util:XmlConfig > Id="MySiteConsoleRedirectUseExactDestination" > ElementId='MySiteConsoleRedirectWebServerRedirect' > Sequence='3' > File="[ApplicationHostFilePath]" > Name="exactDestination" > Value="true"/> > <util:XmlConfig > Id="MySiteConsoleRedirectSetHttpResponse" > ElementId='MySiteConsoleRedirectWebServerRedirect' > Sequence="4" > File="[ApplicationHostFilePath]" > Name="httpResponseStatus" > Value="Permanent"/> > <util:XmlConfig Id="MySiteConsoleRedirectRemoveRedirect" > On="install" > Action="create" > Sequence="5" > File="[ApplicationHostFilePath]" > ElementPath="$(var.MySiteHttpRedirectionXPath)" > Name="remove" > Node="element" > > VerifyPath="$(var.MySiteRemoveHttpRedirectionXPath)"/> > <util:XmlConfig Id="MySiteConsoleRedirectRemoveWildCard" > ElementId="MySiteConsoleRedirectRemoveRedirect" > Sequence="6" > File="[ApplicationHostFilePath]" > Name="wildcard" > Value="/"/> > <util:XmlConfig Id="MySiteConsoleRedirectAddRedirect" > On="install" > Action="create" > Sequence="7" > File="[ApplicationHostFilePath]" > ElementPath="$(var.MySiteHttpRedirectionXPath)" > Name="add" > Node="element" > > VerifyPath="$(var.MySiteAddHttpRedirectionVerifyPath)"/> > <util:XmlConfig Id="MySiteConsoleRedirectSetWildCard" > ElementId="MySiteConsoleRedirectAddRedirect" > Sequence="8" > File="[ApplicationHostFilePath]" > Name="wildcard" > Value="/"/> > <util:XmlConfig Id="MySiteConsoleRedirectSetDestination" > ElementId="MySiteConsoleRedirectAddRedirect" > Sequence="9" > File="[ApplicationHostFilePath]" > Name="destination" > Value="$(var.MySiteHttpRedirectDestination)"/> > <util:XmlConfig Id="MySiteConsoleRedirectDeleteRedirect" > On="uninstall" > Action="delete" > Sequence="10" > File="[ApplicationHostFilePath]" > ElementPath="$(var.MySiteHttpRedirectionXPath)" > Name="add" > Node="element" > > VerifyPath="$(var.MySiteAddHttpRedirectionVerifyPath)"/> > </Component> > </Directory> > </DirectoryRef> > <InstallExecuteSequence> > <Custom Action="SetApplicationHostFilePath" > Before="LaunchConditions" > /> > </InstallExecuteSequence> > <Feature Id="ProductFeature" Level="1"> > <ComponentRef Id="c_MySite"/> > <ComponentRef Id="c_MySiteConsoleRedirect" /> > </Feature> > </Product> > </Wix> > > WebServiceSetup.wxi > <?xml version="1.0" encoding="utf-8"?> > <Include xmlns='http://schemas.microsoft.com/wix/2006/wi' > xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" > xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"> > <iis:WebSite Id='DefaultWebSite' Description='Default Web Site'> > <iis:WebAddress Id='WebAddress' Port='80' Secure='no'/> > <iis:WebAddress Id='WebAddressSSL' Port='443' Secure='yes'/> > </iis:WebSite> > <iis:WebDirProperties Id='MyWebDirProperties' > Read='yes' > Script='yes' > AnonymousAccess='yes' > WindowsAuthentication ='no' > AccessSSL='yes' > AccessSSL128='yes' > AccessSSLRequireCert='no' > AccessSSLNegotiateCert='no' /> > <Component Id="c_$(var.WebServiceName)" > Guid="$(var.WebServiceComponentGuid)" > Directory="$(var.VirtualDirDirectory)"> > <CreateFolder/> > <iis:WebVirtualDir Id='$(var.WebServiceName)VirtualDir' > Alias='$(var.WebServiceName)' > Directory='$(var.VirtualDirDirectory)' > WebSite='DefaultWebSite' > DirProperties='MyWebDirProperties'> > <iis:WebApplication Id='$(var.WebServiceName)WebApplication' > Name='$(var.WebServiceName)' > Isolation='low' > AllowSessions='no' > SessionTimeout='60' > Buffer='yes' > ParentPaths='no' > DefaultScript='VBScript' > ScriptTimeout='60' > WebAppPool='$(var.WebServiceName)Pool'/> > </iis:WebVirtualDir> > <iis:WebAppPool Id='$(var.WebServiceName)Pool' > Name='$(var.WebServiceName)Pool' > Identity='networkService' > RecycleMinutes='1740' > IdleTimeout='1740' > RecycleRequests='0'/> > </Component> > </Include> > > > > > ----- Original Message ---- > From: Zhisheng Huang <zhhuang5...@yahoo.com> > To: General discussion for Windows Installer XML toolset. > <wix-users@lists.sourceforge.net> > Sent: Sat, January 1, 2011 11:43:29 AM > Subject: Re: [WiX-users] problem with XmlConfig when migrating from Wix 3.0 > to Wix 3.5 > > Hi Neil, > > I could repro this. Attched is my simplified repro based on the production > code (Product.wxs and WebServiceSetup.wxi). It sets up a web application > (but without any content, just to simplify repro), then modifies the > corresponding node in applicationHost.config with XmlConfig. So it can be > easily compiled with > > the following by using different version of Wix: > candle.exe -dOutDir=. -dPlatform=x64 -arch x64 -ext > WixUtilExtension.dll -ext WixIIsExtension.dll Product.wxs > light.exe -ext WixUtilExtension.dll -ext WixIIsExtension.dll -out > .\SetupProject.msi -pdbout .\SetupProject.wixpdb .\Product.wixobj > > By the way, our system is x64. So MSI we build are all x64. Msi build with > Wix > 3.0 works fine, but with Wix 3.5 fails with the error in the previous > email. > I didn't try if this repro for x86 or not since I don't have an x86 machine > and the if I build x86 package and try to install on x64 machine, somehow it > fails to install saying it can't open applicationHost.config file in both > cases (build > > with wix 3.0 and 3.5) > > Thanks, > Zhisheng > > > > > > ----- Original Message ---- > From: Neil Sleightholm <n...@x2systems.com> > To: General discussion for Windows Installer XML toolset. > <wix-users@lists.sourceforge.net> > Sent: Sat, January 1, 2011 1:17:31 AM > Subject: Re: [WiX-users] problem with XmlConfig when migrating from Wix 3.0 > to Wix 3.5 > > Could you post the WiX you are using to do this edit. > > Neil > > -----Original Message----- > From: Zhisheng Huang [mailto:zhhuang5...@yahoo.com] > Sent: 01 January 2011 05:40 > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] problem with XmlConfig when migrating from Wix 3.0 to > Wix > 3.5 > > Hi, > > I have a Wix 3.0 project which installs an web application under default > web site, it also uses XmlConfig to modify the section of that web site in > applicationHost.config file. That works fine under Wix 3.0, however, after > migrating to Wix 3.5 it fails with following error. > > ExecXmlConfig: Error 0x800710d8: failed to find node: > /configuration/location/system.webServer in XML file: > C:\Windows\System32\inetsrv\config\applicationHost.config > Error 25542. Failed to find node: /configuration/locati...@path="Default > Web Site/MySite"]/system.webServer in XML file: > > C:\Windows\System32\inetsrv\config\applicationHost.config, system error: > -2147020584 > MSI (s) (C0!50) [23:43:16:852]: Product: My Service -- Error 25542. Failed > to find node: /configuration/locati...@path="Default Web > Site/MySite"]/system.webServer in XML file: > > C:\Windows\System32\inetsrv\config\applicationHost.config, system error: > -2147020584 > > Note, for the migration, nothing was changed in wix source files. Simply > the wxi > > files are recompiled with Wix 3.5. If I uncomment the XmlConfig section to > allow > > the wix 3.5 compiled MSI to isntall, I do see MySite is created and the > node /configuration/locati...@path="Default Web > Site/MySite"]/system.webServer exists > > in applicationHost.config file. > > Any known issue? Any idea what can go wrong here? Any suggestion is greatly > appreciated! > > Zhisheng > > > > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- virtually, Rob Mensching - http://RobMensching.com LLC ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users