Syntax
[update-ini-section]
ini-file, ini-section, [old-ini-entry], [new-ini-entry], [flags]
.
.
.
Replaces, deletes, or adds entries in the given INI file. This is similar to the INF support in Windows 3.1. The update-ini-section name must appear in an UpdateInis entry in the [Install] section. The optional action flags can be one of these values:
0 | Default. Matches Value of old-ini-entry Key, ignores its value. If Key is present, replaces with new-ini-entry. If old-ini-entry is NULL, the new-ini-entry is added unconditionally. If new-ini-entry is NULL, the old-ini-entry is deleted. |
1 | Matches both Key and Value of old-ini-entry. Update is done only if both Key and Value match. |
2 | Conditional and matches only the Key of old-ini-entry. If Key in old-ini-entry already exists, do not replace with new-ini-entry. |
3 | Conditional and matches both Key and Value of old-ini-entry. If the Key=Value of old-ini-entry exists, do not replace with new-ini-entry. |
The wildcard character (*) can be used in specifying the Key and Value, and they will be interpreted correctly.
The ini-file name can be a string or a strings key. A strings key has the form %strkey% where strkey is defined in the [Strings] section in the INF file. In either case, the name must be a valid filename.
The name should include the name of the directory containing the file, but the directory name should be given as a logical directory identifier (LDID) rather than an actual name. Setup replaces an LDID with an actual name during installation.
An LDID has the form %ldid% where ldid is one of the predefined identifiers or an identifier defined in the [DestinationDirs] section. For LDID_BOOT and LDID_BOOTHOST, the backslash is included in the LDID, so %30%boot.ini is the correct way to reference BOOT.INI in the root of the boot drive.
The following examples illustrate entries in this section:
%11%\sample.ini, Section1,, Value1=2 ; adds new entry
%11%\sample.ini, Section2, Value3=*, ; deletes old entry
%11%\sample.ini, Section4, Value5=1, Value5=4 ; replaces old entry