mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 10:33:11 +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
1 changed files with 11 additions and 11 deletions
|
@ -36,7 +36,7 @@ DisplayClassInstaller(
|
||||||
if (InstallFunction != DIF_INSTALLDEVICE)
|
if (InstallFunction != DIF_INSTALLDEVICE)
|
||||||
return ERROR_DI_DO_DEFAULT;
|
return ERROR_DI_DO_DEFAULT;
|
||||||
|
|
||||||
/* Set DI_NEEDRESTART flag */
|
/* Set DI_DONOTCALLCONFIGMG flag */
|
||||||
InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
|
InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
|
||||||
result = SetupDiGetDeviceInstallParams(DeviceInfoSet, DeviceInfoData, &InstallParams);
|
result = SetupDiGetDeviceInstallParams(DeviceInfoSet, DeviceInfoData, &InstallParams);
|
||||||
if (!result)
|
if (!result)
|
||||||
|
@ -46,7 +46,7 @@ DisplayClassInstaller(
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
InstallParams.Flags |= DI_NEEDRESTART;
|
InstallParams.Flags |= DI_DONOTCALLCONFIGMG;
|
||||||
|
|
||||||
result = SetupDiSetDeviceInstallParams(DeviceInfoSet, DeviceInfoData, &InstallParams);
|
result = SetupDiSetDeviceInstallParams(DeviceInfoSet, DeviceInfoData, &InstallParams);
|
||||||
if (!result)
|
if (!result)
|
||||||
|
@ -56,6 +56,15 @@ DisplayClassInstaller(
|
||||||
goto cleanup;
|
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 */
|
/* Get .inf file name and section name */
|
||||||
DriverInfoData.cbSize = sizeof(SP_DRVINFO_DATA);
|
DriverInfoData.cbSize = sizeof(SP_DRVINFO_DATA);
|
||||||
result = SetupDiGetSelectedDriver(DeviceInfoSet, DeviceInfoData, &DriverInfoData);
|
result = SetupDiGetSelectedDriver(DeviceInfoSet, DeviceInfoData, &DriverInfoData);
|
||||||
|
@ -97,15 +106,6 @@ DisplayClassInstaller(
|
||||||
}
|
}
|
||||||
_tcscat(SectionName, _T(".SoftwareSettings"));
|
_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 */
|
/* Open driver registry key and create Settings subkey */
|
||||||
hDriverKey = SetupDiOpenDevRegKey(
|
hDriverKey = SetupDiOpenDevRegKey(
|
||||||
DeviceInfoSet, DeviceInfoData,
|
DeviceInfoSet, DeviceInfoData,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue