Writing INF Files
An INF file must use valid structure and syntax to pass driver package validation checks at the beginning of the installation process.
Use the ChkINF tool to validate the structure and syntax of INF files.
An INF file must contain valid INF SourceDisksFiles and SourceDisksNames sections. Starting with Windows Vista, the operating system does not copy the driver package into the driver store unless these sections are present and filled in correctly.
It is sometimes necessary to copy INF files during device installation so that Windows can find them without repetitively displaying user prompts. For example, the base INF file for a multifunction device might copy the INF files for the device's individual functions so that Windows can find these INF files without prompting the user every time that it installs one of the device's functions.
Starting with Windows XP, if you want to stage other INF files during an installation that is driven by an INF file, use the INF CopyINF directive.
Note Do not use the INF CopyFiles directive to copy INF files.
The components of a driver package must never directly copy or delete INF files directly into a system's %SystemRoot%/Inf directory. This results in the driver's digital signature to be invalidated, and this causes the driver not to load successfully.
Use SetupCopyOEMInf to install INF files.
When you call this function, you should save the value of the DestinationInfFileName parameter as a software key for the device in the registry. You will need this value when the INF file is removed by calling SetupUninstallOEMInf.
Use SetupUninstallOEMInf to remove INF files.
Before you call this function to remove an INF file, you must have previously uninstalled all present and nonpresent devices that were installed by the INF file.
When you call this function, you must use the name of the INF file that was returned in the DestinationInfFileName parameter of SetupCopyOEMInf.
Note Do not set the SUOI_FORCEDELETE flag in the Flags parameter. By default, SetupUninstallOEMInf safely deletes the INF files.