From 64664422f48257bd0b869c367ffc4b4435e032a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Mon, 29 May 2006 11:09:54 +0000 Subject: [PATCH] Do the normal install before custom install actions. So, we should get the right .inf filename in SP_DRVINFO_DETAIL_DATA.InfFileName, as it is modified if the file is copied to %SYSTEMROOT%/Inf svn path=/trunk/; revision=22104 --- reactos/dll/cpl/desk/classinst.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/reactos/dll/cpl/desk/classinst.c b/reactos/dll/cpl/desk/classinst.c index aec66085a0c..eb82f8b4df2 100644 --- a/reactos/dll/cpl/desk/classinst.c +++ b/reactos/dll/cpl/desk/classinst.c @@ -36,7 +36,7 @@ DisplayClassInstaller( if (InstallFunction != DIF_INSTALLDEVICE) return ERROR_DI_DO_DEFAULT; - /* Set DI_NEEDRESTART flag */ + /* Set DI_DONOTCALLCONFIGMG flag */ InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS); result = SetupDiGetDeviceInstallParams(DeviceInfoSet, DeviceInfoData, &InstallParams); if (!result) @@ -46,7 +46,7 @@ DisplayClassInstaller( goto cleanup; } - InstallParams.Flags |= DI_NEEDRESTART; + InstallParams.Flags |= DI_DONOTCALLCONFIGMG; result = SetupDiSetDeviceInstallParams(DeviceInfoSet, DeviceInfoData, &InstallParams); if (!result) @@ -56,6 +56,15 @@ DisplayClassInstaller( goto cleanup; } + /* Do normal install */ + result = SetupDiInstallDevice(DeviceInfoSet, DeviceInfoData); + if (!result) + { + rc = GetLastError(); + DPRINT("SetupDiGetDeviceRegistryProperty() failed with error 0x%lx\n", rc); + goto cleanup; + } + /* Get .inf file name and section name */ DriverInfoData.cbSize = sizeof(SP_DRVINFO_DATA); result = SetupDiGetSelectedDriver(DeviceInfoSet, DeviceInfoData, &DriverInfoData); @@ -97,15 +106,6 @@ DisplayClassInstaller( } _tcscat(SectionName, _T(".SoftwareSettings")); - /* Do normal install */ - result = SetupDiInstallDevice(DeviceInfoSet, DeviceInfoData); - if (!result) - { - rc = GetLastError(); - DPRINT("SetupDiGetDeviceRegistryProperty() failed with error 0x%lx\n", rc); - goto cleanup; - } - /* Open driver registry key and create Settings subkey */ hDriverKey = SetupDiOpenDevRegKey( DeviceInfoSet, DeviceInfoData,