Home Dashboard Directory Help
Search

wdfcoinstaller01011.dll works incorrectly in an installer custom action by Michail Frolov


Status: 

Active


1
0
Sign in
to vote
Type: Bug
ID: 829509
Opened: 3/6/2014 6:34:19 PM
Access Restriction: Public
1
Workaround(s)
view
1
User(s) can reproduce this bug

Description

Calling WdfPreDeviceInstall(Ex) from wdfcoinstaller01011.dll fails on Windows 7 if the function is called from MSI custom action.

This is because Windows 7 has a shim that lies about Windows version to Windows Installer. VistaRTMVersionLie reports Vista to GetVersion(Ex). As a result WdfPreDeviceInstall(Ex) extracts incorrect .MSU for windows Vista and attempts to install it.

Output from MSI log produces by a call to GetVersionEx in a custom action DLL:

GetVersionEx 6.0

Output from setupact.log:

WdfCoInstaller: [03/06/2014 20:04.52.977] ReadComponents: WdfSection for Driver Service smkbfltr using KMDF lib version Major 1, minor 11
WdfCoInstaller: [03/06/2014 20:04.53.024] DIF_INSTALLDEVICE: Coinstaller version: 1.11.0
WdfCoInstaller: [03/06/2014 20:04.53.040] DIF_INSTALLDEVICE: KMDF in-memory version: 1.9.7600
WdfCoInstaller: [03/06/2014 20:04.53.040] DIF_INSTALLDEVICE: KMDF on-disk version: 1.9.7600
WdfCoInstaller: [03/06/2014 20:04.53.040] Service Wdf01000 is running
WdfCoInstaller: [03/06/2014 20:04.53.040] DIF_INSTALLDEVICE: Reboot is required, because the in-memory KMDF version is older than KmdfLibraryVersion for service smkbfltr.
WdfCoInstaller: [03/06/2014 20:04.53.055] DIF_INSTALLDEVICE: Update is required, because the on-disk KMDF version is older than the coinstaller
WdfCoInstaller: [03/06/2014 20:04.53.055] Invoking "C:\Windows\system32\wusa.exe "C:\Windows\Temp\WdfTemp\Kmdf-1.11-Win-6.0.msu" /quiet /norestart".
WdfCoInstaller: [03/06/2014 20:05.06.086] The update process returned error code :status(80240017) <no error text>.
Details
Sign in to post a comment.
Posted by Microsoft on 3/31/2014 at 10:12 AM
You're right that it’s due to a compatibility issue in MSI that WdfCoinstaller does not work as expected. As a workaround, you can invoke a custom action as a standalone executable, and then call WdfPreDeviceInstallEx from there.
Posted by Microsoft on 3/7/2014 at 12:46 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information. If you require immediate assistance with this issue, please contact product support at http://support.microsoft.com/ph/1117.
Posted by Microsoft on 3/6/2014 at 6:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by Microsoft on 3/28/2014 at 4:33 PM
As a workaround, invoke a custom action as a standalone executable, and then call WdfPreDeviceInstallEx from there. My assumption is that the child process won’t have the app compat flag set to Vista.