diff options
-rw-r--r-- | setupapihost/host.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/setupapihost/host.c b/setupapihost/host.c index e930358..cefd68b 100644 --- a/setupapihost/host.c +++ b/setupapihost/host.c @@ -72,6 +72,8 @@ VOID __stdcall RemoveInstance(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int if (!SetupDiOpenDeviceInfoW(DevInfo, InstanceId, NULL, DIOD_INHERIT_CLASSDRVS, &DevInfoData)) { LastError = GetLastError(); + if (LastError == ERROR_PATH_NOT_FOUND) + LastError = ERROR_SUCCESS; goto cleanupDevInfo; } SP_REMOVEDEVICE_PARAMS RemoveDeviceParams = { .ClassInstallHeader = { .cbSize = sizeof(SP_CLASSINSTALL_HEADER), |