Hi.
I've been working on adapting our current coninstaller to vista. The
major change was that i had to move all interactive user actions to the
DIF_FINISHINSTALL_ACTION instead of the
DIF_NEWDEVICEWIZARD_FINISHINSTALL to allow user interaction.
I've implemented the code as mentioned in
http://www.microsoft.com/whdc/driver/install/Finish_Install.mspx. It
worked well for a while on Vista installations, but for some reason,
any RC build after 5739 fails to call the coinstaller with the
DIF_FINISHINSTALL_ACTION code. I made sure that on the
DIF_NEWDEVICEWIZARD_FINISHINSTALL i set the
DI_FLAGSEX_FINISHINSTALL_ACTION flag correctly, and then call the
SetupDiSetDeviceInstallParams function with the new flags. this worked
a\for a while as i said, but it suddenly stopped.
this is the code in the coinstaller :
case DIF_NEWDEVICEWIZARD_FINISHINSTALL :
D0("DIF_NEWDEVICEWIZARD_FINISHINSTALL");
if(DevInfo == NULL) {
break;
}
if(SetupDiGetDeviceRegistryProperty(DevInfoSet, DevInfo,
SPDRP_DRIVER, &Prop_data_type, prop_buffer, 1024, &size))
{
if((Prop_data_type == REG_SZ) || (Prop_data_type == REG_MULTI_SZ))
D0("SetupDiGetDeviceRegistryProperty: buffer %s", prop_buffer);
else
{
ULONG* pLong = (ULONG*)prop_buffer;
}
}
res = Context->InstallResult;
// Get OS Version.
OSVERSIONINFO m_VerInfo;
m_VerInfo.dwOSVersionInfoSize =sizeof(OSVERSIONINFO);
GetVersionEx(&m_VerInfo);
if(m_VerInfo.dwPlatformId == VER_PLATFORM_WIN32_NT &&
m_VerInfo.dwMajorVersion <= 5)
{
// XP or win2k
OnInstall(Opt, (char*)prop_buffer);
}
else
{
// higher than XP, probably Vista.
SP_DEVINSTALL_PARAMS DeviceInstallParams;
DeviceInstallParams.cbSize = sizeof(DeviceInstallParams);
if (SetupDiGetDeviceInstallParams(DevInfoSet,
DevInfo,
&DeviceInstallParams))
{
DeviceInstallParams.FlagsEx |= DI_FLAGSEX_FINISHINSTALL_ACTION;
SetupDiSetDeviceInstallParams(DevInfoSet,
DevInfo,
&DeviceInstallParams);
}
}
break;
}
I'd appreciate if anyone doing something similar can let me know what
i've done wrong, or if this is a bug in the last few vista builds.
Thanks.
Chen Ganir.