Creates this:
[Test]
TestKey=TestValue2
Here is the sample which installs ini file both in the installation folder and Windows folder. Code for this sample is attached.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
<?include ..\..\Common\CommonDefinitions.wxi ?>
<?include Definitions.wxi ?>
<Product Id="$(var.ProductCode)"
Name="$(var.ProductName)"
Language="$(var.Language)"
Version="$(var.CurrentVersion)"
Manufacturer="$(var.Manufacturer)"
UpgradeCode="$(var.UpgradeCode)" >
<Package Id="$(var.PackageCode)"
Description="$(var.PackageDescription)"
Comments="$(var.PackageComments)"
InstallerVersion="200"
Compressed="yes"
Languages="$(var.Languages)" />
<?include ..\..\Common\ARP.wxi ?>
<Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />
<?include ..\..\Common\UpgradeSupport.wxi ?>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLLOCATION"
Name="Minimal"
LongName="MinimalInstallation">
<Component Id="TestIni"
Guid="{DC752365-A598-4B76-AC60-C99BF34D539F}">
<CreateFolder />
<IniFile Id="Ini1"
Action="createLine"
Directory="INSTALLLOCATION"
Section="Test"
Name="Minimal.ini"
Key="TestKey"
Value="TestValue" />
<IniFile Id="Ini2"
Action="createLine"
Directory="WindowsFolder"
Section="Test"
Name="Minimal.ini"
Key="TestKey"
Value="WindowsFolder TestValue" />
</Component>
</Directory>
</Directory>
</Directory>
<Feature Id="MainFeature"
Title="TestApp application"
Level="1">
<ComponentRef Id="TestIni" />
</Feature>
</Product>
</Wix>