[ros-diffs] [hpoussin] 22104: 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

hpoussin at svn.reactos.org hpoussin at svn.reactos.org
Mon May 29 13:09:54 CEST 2006


Author: hpoussin
Date: Mon May 29 15:09:54 2006
New Revision: 22104

URL: http://svn.reactos.ru/svn/reactos?rev=22104&view=rev
Log:
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

Modified:
    trunk/reactos/dll/cpl/desk/classinst.c

Modified: trunk/reactos/dll/cpl/desk/classinst.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/classinst.c?rev=22104&r1=22103&r2=22104&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/desk/classinst.c (original)
+++ trunk/reactos/dll/cpl/desk/classinst.c Mon May 29 15:09:54 2006
@@ -36,7 +36,7 @@
 	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,13 +46,22 @@
 		goto cleanup;
 	}
 
-	InstallParams.Flags |= DI_NEEDRESTART;
+	InstallParams.Flags |= DI_DONOTCALLCONFIGMG;
 
 	result = SetupDiSetDeviceInstallParams(DeviceInfoSet, DeviceInfoData, &InstallParams);
 	if (!result)
 	{
 		rc = GetLastError();
 		DPRINT("SetupDiSetDeviceInstallParams() failed with error 0x%lx\n", rc);
+		goto cleanup;
+	}
+
+	/* Do normal install */
+	result = SetupDiInstallDevice(DeviceInfoSet, DeviceInfoData);
+	if (!result)
+	{
+		rc = GetLastError();
+		DPRINT("SetupDiGetDeviceRegistryProperty() failed with error 0x%lx\n", rc);
 		goto cleanup;
 	}
 
@@ -96,15 +105,6 @@
 		goto cleanup;
 	}
 	_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(




More information about the Ros-diffs mailing list