I want to do something similar as well, but from what I've found, file I/O 
through WiX is generally not possible (aside from
creating a custom action running an external program that does the file I/O).

Hopefully a simpler solution exists?

Alain

-----Original Message-----
From: chennam [mailto:chatrapathi.chen...@gmail.com] 
Sent: April 1, 2013 13:45
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Change content of Config file after installation

Hi 

I want to change content of the Config file by detecting the Server on which 
the file or MSI package  is installed to.Below is the
component of the config file.

<Component Id="cmp5F6F9B35A372943520CC8D5ABDE2F507"
Directory="dirCFCE6D07D3330FE628276777F0488B18"
Guid="{3AFB6DE8-D43E-4EC3-BC10-251EABFE3DD0}">
                <File Id="fil24F01DF9AB46C9205A3E021D5E98A3CF" KeyPath="yes"
Source="$(var.SCBUDirect.B2CWeb.ProjectDir)Web.Prod.Web1.config" > <CopyFile 
Id="WebConfigPROD"
DestinationProperty="DestFilesWebsiteFolder"
DestinationName="Web.config"/>
              </File>
              <Condition> </Condition>
</Component>

And the content as of now for  "Web.Prod.Web1.config" is as below 

Before:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
        <system.webServer>
           <httpProtocol>
            
            <customHeaders>
                <remove name="X-ServerID" />
                <add name="X-ServerID" value="web1" />
            </customHeaders>
          </httpProtocol>
        </system.webServer>
</configuration> 

The content should be changed to as below
After:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
        <system.webServer>
           <httpProtocol>
            
            <customHeaders>
                <remove name="X-ServerID" />
                <add name="X-ServerID" value="Name of the Server or Computer 
name" />
            </customHeaders>
          </httpProtocol>
        </system.webServer>
</configuration> 






--
View this message in context:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Change-content-of-Config-file-after-installation-tp7584789.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013 Rise to greatness in 
Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game on Steam. $5K 
grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to