mirror of
https://github.com/reactos/reactos.git
synced 2024-08-01 09:01:13 +00:00
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
This commit is contained in:
parent
9d5ecbef5d
commit
64664422f4
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue