https://git.reactos.org/?p=reactos.git;a=commitdiff;h=25019525f821fb1786e77…
commit 25019525f821fb1786e77bab4b1e5531fef8c200
Author: Olaf Schmerse <olase23(a)yahoo.de>
AuthorDate: Tue May 3 16:13:37 2022 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue May 3 16:13:37 2022 +0200
[NEWDEV] Stop update driver wizard from changing device class (#4480)
CORE-18166
The update driver wizard should not change the device class by default,
especially when there is already a class set. This is the case when the
wizard gets called from the device manager.
---
dll/win32/newdev/wizard.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/dll/win32/newdev/wizard.c b/dll/win32/newdev/wizard.c
index 28e3053356b..7cdd4df3960 100644
--- a/dll/win32/newdev/wizard.c
+++ b/dll/win32/newdev/wizard.c
@@ -255,11 +255,13 @@ FindDriverProc(
}
else
{
- /* Update device configuration */
- SetFailedInstall(DevInstData->hDevInfo,
- &DevInstData->devInfoData,
- TRUE);
-
+ if (!DevInstData->bUpdate)
+ {
+ /* Update device configuration */
+ SetFailedInstall(DevInstData->hDevInfo,
+ &DevInstData->devInfoData,
+ TRUE);
+ }
PostMessage(DevInstData->hDialog, WM_SEARCH_FINISHED, 0, 0);
}
return 0;
@@ -518,9 +520,12 @@ WelcomeDlgProc(
(WPARAM)TRUE,
(LPARAM)0);
- SetFailedInstall(DevInstData->hDevInfo,
- &DevInstData->devInfoData,
- TRUE);
+ if (!DevInstData->bUpdate)
+ {
+ SetFailedInstall(DevInstData->hDevInfo,
+ &DevInstData->devInfoData,
+ TRUE);
+ }
break;
}