Implementing Finish-Install Actions
Note
Features described in this section are not supported in universal or mobile driver packages. See Using a Universal INF File.
Installers (a class installer, class co-installer, or device co-installer) supply finish-install actions. A finish-install action can run an executable program, create a process, create a thread, or execute code in the device driver installation finish-install process.
To implement finish-install actions, an installer:
Sets the DI_FLAGSEX_FINISHINSTALL_ACTION flag when the installer processes a DIF_NEWDEVICEWIZARD_FINISHINSTALL DIF code and returns one of the following error codes:
- ERROR_DI_DO_DEFAULT if it is a class installer without finish-install wizard pages.
- NO_ERROR if it is a class installer with finish-install wizard pages or a co-installer with or without finish-install wizard pages.
Performs the finish-install actions when it processes a DIF_FINISHINSTALL_ACTION request.
An installer returns one of the error codes in the following table.
Error code Meaning ERROR_DI_DO_DEFAULT
Class installer: The class installer has successfully run its finish-install actions and is requesting Windows to perform its default processing. A class installer should also return this error code if it has no finish-install actions.
Device or class co-installer: Co-installers do not return this error code.
NO_ERROR
Class installer: The class installer has successfully run its finish-install action. Windows should not perform its default processing.
Device or class co-installer: The co-installer has either successfully run its finish-install actions or has no finish-install actions.
Microsoft Win32 error
The installer encountered an error, but the finish-install action should be attempted again. Returning a Win32 error code indicates that Windows should run another finish-install process to complete the finish-install actions the next time the device is enumerated.
Note If a finish-install action fails and should not be attempted again, a class installer returns ERROR_DI_DO_DEFAULT and a device or class co-installer returns NO_ERROR.
For information about how to develop finish-install actions, see Guidelines for Implementing Finish-Install Actions For sample code that shows how to implement finish-install actions, see the following topics: