Previous Next

INF UpdateInis Directive

[DDInstall] |
[DDInstall.CoInstallers] |
[ClassInstall32] |
[ClassInstall32.nt] |
[ClassInstall32.ntx86] |
[ClassInstall32.ntia64]

 

UpdateInis=update-ini-section[, update-ini-section] ...
 
 

An UpdateInis directive references one or more named sections, specifying an INI file from which a particular section or line is to be read and applied to an existing INI file of the same name on the target machine. Optionally, line-by-line modifications from and to such INI files can be specified in the update-ini-section.

This directive is almost never specified in INF files for installation on NT-based systems, due to the lack of necessity for INI files. However, the UpdateInis directive is valid in any of the sections shown in the formal syntax statement, as well as in INF-writer-defined sections referenced by an AddInterface directive or referenced in an InterfaceInstall32 section.

Comments

A given update-ini-section name must be unique to the INF file.

Each INF-writer-created section name must be unique within the INF and must follow the general rules for defining section names. These rules are described in General Syntax Rules for INF Files. For information about how to use the system-defined .nt, .ntx86, and .ntia64 extensions, see Creating INF Files for Multiple Platforms and Operating Systems.

Each named section referenced by an UpdateInis directive has the following form:

[update-ini-section]
 

ini-file,ini-section[,old-ini-entry][,new-ini-entry][,flags]
...

An update-ini-section can have any INF-writer-determined number of entries, each on a separate line.

UpdateInis-Referenced Section Entries

ini-file
Specifies the name of an INI file supplied on the source media and, implicitly, that of the INI file to be updated on the target machine. This value can be expressed as a filename or as a %strkey% token that is defined in a Strings section of the INF file.
ini-section
Specifies the name of the section within the given INI file. If the next two values are specified, this section contains an entry to be changed. If an old-ini-entry is omitted but a new-ini-entry is provided, the new entry is to be added as this section is read.
old-ini-entry
This optional value specifies the name of an entry in the given ini-section, usually expressed in the form "key=value". Either or both of key and value can be expressed as %strkey% tokens defined in a Strings section of the INF file. The asterisk (*) can be specified as a wild-card for either the key or the value.
new-ini-entry
This optional value specifies either a change to a given old-ini-entry or the addition of a new entry. This value can be expressed in the same manner as old-ini-entry.
flags
This optional value controls the interpretation of the given old-ini-entry and/or new-ini-entry. The flags can be one of the following numerical values:
Value Meaning
0 This is the default value for the flags if it is omitted.

If the given old-ini-entry key is present in the INI files, replace that key=value with the given new-ini-entry. Only the keys in the INI files must match; the corresponding value of each such key is ignored.

To add a new-ini-entry to the destination INI file unconditionally, omit the old-ini-entry value from the entry in the update-ini section of the INF. To delete an old-ini-entry from the destination INI file unconditionally, omit the new-ini-entry value.

1 If the given old-ini-entry (key=value) exists in the INI files, replace it in the destination INI file with the given new-ini-entry. Both the key and value of the given old-ini-entry must match those in the INI files for such a replacement to be made, not just their keys as for the preceding flags value.
2 If the key specified for old-ini-entry cannot be found in the destination INI file, do nothing. Otherwise, the changes made depend on matches found in the INI files for the given keys of old-ini-entry and new-ini-entry, as follows:

If the key of the old-ini-entry exists in the INI files but so does the key of the new-ini-entry, replace the old-ini-entry with the new-ini-entry in the destination INI file and, then, remove the superfluous new-ini-entry from that INI file.

If the key of the old-ini-entry exists in the INI files but the key of the new-ini-entry does not, replace the old-ini-entry key with that of the new-ini-entry in the destination INI file but leave the value of the old-ini-entry unchanged.

3 If the key and value specified for old-ini-entry cannot be found in the INI files, do nothing. Otherwise, the changes made depend on matches found in the INI files for the given keys and values of old-ini-entry and new-ini-entry, as follows:

If the key=value of the old-ini-entry exists in the INI files but so does the key=value of the new-ini-entry, replace the old-ini-entry with the new-ini-entry in the destination INI file and, then, remove the superfluous new-ini-entry from that INI file.

If the key=value of the old-ini-entry exists in the INI files but the new-ini-entry does not, replace the old-ini-entry with the new-ini-entry in the destination INI file but leave the value of the old-ini-entry unchanged.


The INF provides the full path to the given ini-file on the distribution media in one of the following ways:

Any filename specified within an old-ini-entry or new-ini-entry should designate the destination directory containing that file. Such a destination directory path to a filename in an update-ini-section entry must be specified as a dirid. For lists of possible dirid values, see Using Dirids.

See Also

AddInterface, ClassInstall32, DDInstall, DDInstall.CoInstallers, DestinationDirs, Ini2Reg, InterfaceInstall32, ProfileItems, SourceDisksFiles, SourceDisksNames, Strings, UpdateIniFields, Version