Installing From an INF File

After you retrieve installation information from an INF file, there are several file-handling functions that you can use to install the files listed in an INF section. Low-level functions such as SetupInstallFile and SetupInstallFileEx install a single file.

There are also functions to handle compressed files. The SetupGetFileCompressionInfo function returns information about compressed files. This information can then be used by SetupDecompressOrCopyFile to copy and, if necessary, expand the file.

High-level functions such as SetupInstallFromInfSection, SetupInstallFilesFromInfSection, and SetupInstallServicesFromInfSection process the installation operations in an Install or Service section. Of these, SetupInstallFromInfSection is the most versatile because it can perform any type of installation operation listed in the Install section of an INF file. This includes the registry and INI operations listed in the AddReg, DelReg, UpdateInis, or UpdateIniField lines of an Install section.

The SetupInstallFilesFromInfSection and SetupInstallServicesFromInfSection functions queue operations from an Install or Service section, respectively, to an existing file queue. For more information, see File Queues.

In contrast, the SetupInstallFromInfSection function creates and destroys its own internal queue. A common use for SetupInstallFromInfSection is to call it after all files have been successfully copied to perform the registry and INI transactions.

In addition to the functions previously listed, the Setup API includes functions that queue file installation operations, either by file, or by INF section. For more information, see File Queues.