Search code examples
windowsdevice-driversetupapi

When will SetupUninstallOEMInf return ERROR_NO_MORE_ITEMS?


Under what circumstances does SetupAPI's SetupUninstallOEMInf function set the ERROR_NO_MORE_ITEMS error code?

The MSDN documentation does not detail this.


Solution

  • Apparently the ERROR_NO_MORE_ITEMS error code can indicate there are still installed devices using this .INF file (and the SUOI_FORCEDELETE flag wasn't specified).

    Reading %windir%\setupapi.log (on XP) or %windir%\Inf\setupapi.dev.log (on Vista and higher) can be helpful to determine what SetupAPI is really trying to say.