Hi i want to make a parent web.config file by WiX in the IIS root directory. I cant know, if a web.config file will already exists in the IIS root directory or not, so i have to create a web.config file if there is no one and only modify it , if there is already a web.config file (without deleting other code inside). i tried it with the <util:XMLConfig ...> element.
Here my code snippet: <Property Id="IISROOT"> <RegistrySearch Id="IISROOT" Type="raw" Root="HKLM" Key="Software\Microsoft\InetStp" Name="PathWWWRoot" /> </Property> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder" Name="PFiles"> <Directory Id="IISROOT" Name="."> <Component Id="IISROOTREF" Guid="3a638c0c-ba38-46be-942d-1a2bc350f35c"> <File Id="webconfig" Name="web.config" Source="C:\inetpub\wwwroot\web.config" Vital="yes" DiskId="1" /> <util:XmlConfig Id="Location1Element" File="[IISROOT]web.config" Action="create" Name="location" ElementPath="//configuration" Sequence="1" Node="element" On="install" /> <!-- ... more XmlConfig elements ... --> <util:XmlConfig Id="removeLocation1Element" File="[IISROOT]web.config" Action="delete" ElementPath="//configuration" Node="element" VerifyPath="location[...@path='SchedulerWebAccessService'[\]]" On="uninstall" Sequence="1" /> </Component> <Directory Id='INSTALLDIR' Name='Scheduler_WebAccess'> <Directory Id="WebsiteDir" Name="Website"> <Directory Id="WebsiteBin" Name="bin" /> </Directory> <Directory Id="WebServiceDir" Name="WebService" /> </Directory> </Directory> </Directory> </Directory> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" /> <UIRef Id="WixUI_InstallDir" /> ... is this the right way? -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-create-or-modify-a-web-config-file-in-IIS-root-directory-tp4942208p4942208.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users