Perform a Quiet DIFxAPI Preinstall
A quiet preinstall, also referred to as silent preinstall, suppresses wizard pages, user dialog boxes, and other user messages. To perform a quiet preinstall, call DriverPackagePreinstall and supply the following parameters:
A pointer in DriverPackageInfPath to a string that supplies the fully qualified path of the INF file of the driver package. For more information about supplying an INF file path, see Specifying a Driver Package INF File.
A value of DRIVER_PACKAGE_SILENT in Flags.
The following code example demonstrates a default preinstall for the driver package whose INF file path is D:\Directory\SomeINFfile.inf.
#define UNICODE #include "difxapi.h" . . . PTCHAR DriverPackageInfPath = TEXT("d:\\directory\\SomeINFfile.inf"); DWORD Flags = DRIVER_PACKAGE_SILENT; DWORD ReturnCode = ERROR_SUCCESS; . . . ReturnCode = DriverPackagePreinstall(DriverPackageInfPath, Flags );
DriverPackagePreinstall returns ERROR_SUCCESS if the specified driver package was successfully preinstalled. Otherwise, the function did not preinstall the driver package and returns an error code that indicates the cause of the failure. The common return values that indicate that a quiet preinstall failed are the same as those that are listed in Perform a Default DIFxAPI Preinstall.