Hi!
i am trying to modify a maybe existing web.config file in the IIS root
directory (default = c:\inetpub\wwwroot)
but if i try this code below, a error occurs:
"The system cannot find the file 'SourceDir\PFiles\web.config' "
Why the hell is it using the parent directories? i thought the parameter "."
by the Directory element "IISROOT" will ignore all parent directories
(SourceDir and PFiles) and use the property value of it
(c:\inetpub\wwwroot).

    <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" 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 ... -->
          </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" />
...

i tried to set the Source parameter too at the <File> element like
"Source='[IISROOT]web.config'" but then the next error occurs like the first
one with "cant find file '[IISROOT]web.config' ".

btw. if i remove the failed part of my code and compile and run the setup
the userinterface displayes and selects the default installpath
"C:\inetpub\wwwroot\Scheduler_WebAccess" and thats correct !!! so i really
dont understand why the error with "cant find file
'SourceDir\PFiles\web.config' " occurs because the right path must be
C:\inetpub\wwwroot\web.config

   
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/XmlConfig-results-in-ICE27-failure-tp4760300p4942026.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

Reply via email to