Executes an install section in an information (INF) file, or execute a program. Supports advanced INF files.
Syntax
One way to edit the Windows Registry is with a special file type with the extension INF. Its construction and use is described.
Background and Introduction to INF Files
INF (Information) files have been around for a long time. They are text files with the file extension
RenFiles
[Rename-files-section-name]
new-file-name, old-file-nameQUOTELists the names of files to be renamed. The name of the section must appear in a Renfiles item in an Install section of the INF file.new-file-name
New name of the file.old-file-name
Old name of the file.This example renames the files
CopyFiles
[install-section-name]
CopyFiles=file-list-section[file-list-section]
destination-file1-name(, source-file1-name)(, temporary-file1-name)(,flag)
destination-file2-name(, source-file2-name)(, temporary-file2-name)(,flag)A list of the names of files to be copied from a source disk to a destination directory. The source disk and destination directory associated with each file are specified in other sections of the INF file. The file-list-section name must appear in the
[Strings]
The “Strings” section is generally the last section in the INF file, a string key defined in this section may be used anywhere in the INF file that the corresponding string would be used. Using a strings key requires that it be enclosed in percent signs (%)
CODE[Strings]
strings-key=valueQUOTEstrings-key
A unique name consisting of letters and digits.value
A string consisting of letters, digits, or other printable characters. It should be enclosed in double-quotation marks if the corresponding strings key is used in a type of item that requires double quotation marks.The Strings section makes translation of strings for international markets easier by placing all strings that can be displayed at the user interface when the INF file is used in a single section of the INF file. Strings keys should be used whenever possible.
Here is an example of what Strings are used for
Somewhere in the INF file you may find something like
[Version]
The Version section is at the beginning of every INF file (all INF files must have this section.) It determines what Platforms or Operating Systems the files can be installed on.
For Windows NT-based operating systems (NT, 2000, XP)
CODE[Version]
Signature=”$Windows NT$”For Windows 9x (95, 98, ME)
CODE[Version]
Signature=”$Windows 95$”For
