Index: dll/win32/setupapi/install.c =================================================================== --- dll/win32/setupapi/install.c (revision 67263) +++ dll/win32/setupapi/install.c (working copy) @@ -2049,6 +2049,7 @@ { struct DeviceInfoSet *list = NULL; BOOL ret = FALSE; + BOOL found_section = FALSE; TRACE("%p, %s, 0x%lx, %p, %p, %p, %p\n", hinf, debugstr_w(sectionname), flags, DeviceInfoSet, DeviceInfoData, reserved1, reserved2); @@ -2109,6 +2110,7 @@ ret = SetupFindFirstLineW(hinf, sectionname, AddService, &ContextService); while (ret) { + found_section = TRUE; if (!GetStringField(&ContextService, 1, &ServiceName)) goto nextservice; @@ -2143,11 +2145,14 @@ ret = SetupFindNextMatchLineW(&ContextService, AddService, &ContextService); } - if (bNeedReboot) - SetLastError(ERROR_SUCCESS_REBOOT_REQUIRED); - else - SetLastError(ERROR_SUCCESS); - ret = TRUE; + if (found_section) + { + if (bNeedReboot) + SetLastError(ERROR_SUCCESS_REBOOT_REQUIRED); + else + SetLastError(ERROR_SUCCESS); + ret = TRUE; + } } TRACE("Returning %d\n", ret);