Deploy the Windows 7 Kernel Mode Driver Framework (KMDF) with ConfigMgr 2012 11

So you got your brand new Dell or other manufacturer’s hardware, deploy an OS with ConfigMgr 2012 and he, no go – chrash – missing drivers etc.

Well you might need the new Kernel Mode Driver Framework 1.11 (here) or the User Mode Driver Framework 1.11 (here).

But wait, this is an Windows Update! And I am doing OSD.

To successfully add the Driver Framework use good old dism
during OSD. Of course you will build a new reference image but in the meantime you have some deployment to do.

Okay let’s start.

First extract the files out of the .msu (I am using the x64 version for this). Use WinRar or 7zip for this.

In this folder create a batch file – install.cmd – containing following code:

Dism.exe /Image:%1\ /Add-Package /PackagePath:"%~dp0Windows6.1-KB2685811-x64.cab" /NoRestart

So the content of folder will now look like this (b.t.w. we do not need the .msu in the package ;-))

Create a ConfigMgr package from these files. No program needed! Distribute the content.

Now we can apply this in our Task Sequence. It has to be done AFTER the ‘Apply Operating System’, but BEFORE the installation of the ConfigMgr client.

Add a ‘Run Command Line’ and enter following as command:

Cmd.exe /c install.cmd %OSDTargetSystemDrive%

Reference the package.

Now the KMDF will be installed during the deployment!

You can do the same steps for the UMDF.

11 thoughts on “Deploy the Windows 7 Kernel Mode Driver Framework (KMDF) with ConfigMgr 2012

  1. Pingback: OSD – Injecting the Windows 7 Kernel Mode Driver Framework (KMDF) | Cloud Solutions Architect

  2. Reply jguevara Mar 31,2015 4:17 pm

    Thanks for the guide – I tried to incorporate this into my environment but have not been quite successful in getting this to work as intended. I used your guide and shortly after re-imaged a Latitude E7250 and below is the SMSTS.log output :

    =======================================================================
    VerifyContentHash: Hash algorithm is 32780 InstallSoftware 3/30/2015 6:47:02 PM 860 (0x035C)
    Content successfully downloaded at D:\_SMSTaskSequence\Packages\CM10022C. InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Resolved source to ‘D:\_SMSTaskSequence\Packages\CM10022C’ InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Command line for extension .exe is “%1″ %* InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Set command line: Run command line InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Working dir ‘D:\_SMSTaskSequence\Packages\CM10022C’ InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Executing command line: Run command line InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Process completed with exit code 2 InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    D:\_SMSTaskSequence\Packages\CM10022C>Dism.exe /Image:”D:” /Add-Package /PackagePath:”D:\_SMSTaskSequence\Packages\CM10022C\Windows6.1-KB2685811-x64.cab” /NoRestart InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Deployment Image Servicing and Management tool InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Version: 6.3.9600.16384 InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Error: 2 InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Unable to access the image. InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder. InstallSoftware 3/30/2015 6:47:03 PM 860 (0x035C)
    =======================================================================

    Error: 2 Unable to access the image is the failure that stand out, any suggestions as to what I can do next to get this working? We use SCCM 2012 R2 with MDT 2013 integration..

    Dism log output:

    ========================================================================
    [1308] [0xc142011c] WIMGetMountedImageHandle:(2568)
    2015-03-30 18:47:03, Info DISM DISM WIM Provider: PID=1308 TID=756 [D:\_SMSTaskSequence\Packages\CM10022C] is not a WIM mount point. – CWimMountedImageInfo::Initialize
    2015-03-30 18:47:03, Info DISM DISM VHD Provider: PID=1308 TID=756 [D:\_SMSTaskSequence\Packages\CM10022C] is not recognized by the DISM VHD provider. – CVhdImage::Initialize
    2015-03-30 18:47:03, Info DISM DISM Provider Store: PID=1308 TID=756 Getting Provider VHDManager – CDISMProviderStore::GetProvider
    2015-03-30 18:47:03, Info DISM DISM Provider Store: PID=1308 TID=756 Provider has previously been initialized. Returning the existing instance. – CDISMProviderStore::Internal_GetProvider
    2015-03-30 18:47:03, Info DISM DISM VHD Provider: PID=1308 TID=756 [D:\_SMSTaskSequence\Packages\CM10022C] is not recognized by the DISM VHD provider. – CVhdImage::Initialize
    2015-03-30 18:47:03, Info DISM DISM Imaging Provider: PID=1308 TID=756 The provider VHDManager does not support CreateDismImage on D:\_SMSTaskSequence\Packages\CM10022C – CGenericImagingManager::CreateDismImage
    2015-03-30 18:47:03, Info DISM DISM Provider Store: PID=1308 TID=756 Getting Provider WimManager – CDISMProviderStore::GetProvider
    2015-03-30 18:47:03, Info DISM DISM Provider Store: PID=1308 TID=756 Provider has previously been initialized. Returning the existing instance. – CDISMProviderStore::Internal_GetProvider
    [1308] [0x80070002] FIOReadFileIntoBuffer:(1415): The system cannot find the file specified.
    [1308] [0xc142011c] UnmarshallImageHandleFromDirectory:(511)
    [1308] [0xc142011c] WIMGetMountedImageHandle:(2568)
    2015-03-30 18:47:03, Info DISM DISM WIM Provider: PID=1308 TID=756 [D:\_SMSTaskSequence\Packages\CM10022C] is not a WIM mount point. – CWimMountedImageInfo::Initialize
    2015-03-30 18:47:03, Info DISM DISM Imaging Provider: PID=1308 TID=756 The provider WimManager does not support CreateDismImage on D:\_SMSTaskSequence\Packages\CM10022C – CGenericImagingManager::CreateDismImage
    2015-03-30 18:47:03, Info DISM DISM Imaging Provider: PID=1308 TID=756 No imaging provider supported CreateDismImage for this path – CGenericImagingManager::CreateDismImage
    2015-03-30 18:47:03, Error DISM DISM.EXE: Failed to access the image folder or image’s windows folder.
    2015-03-30 18:47:03, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.
    ========================================================================

  3. Reply Alain Feb 22,2016 6:11 pm

    i have the same exact issue than jguevara

    • Reply Stephan Wibier Feb 22,2016 8:36 pm

      Hi Alain,

      where does your image land? Use a captured image instead of the install.wim
      As from the log files the image lands on D: drive.

      Check which index you reference and where your image lands.
      If needed use the TS parameter: OSDPreserveDriveLetter = “false”

      /Stephan

      • Reply Alain Feb 22,2016 8:55 pm

        i already use a captured image, the image lands on C, i use the partition variable OSDisk, OSDPreserveDriveLetter already to false…

  4. Reply Alain Feb 22,2016 9:56 pm

    Expand a string: WinPEandFullOS TSManager 2016-02-22 14:26:06 276 (0x0114)
    Executing command line: smsswd.exe /run:CSC0008E Cmd.exe /c install.cmd %OSDTargetSystemDrive% TSManager 2016-02-22 14:26:06 276 (0x0114)
    [ smsswd.exe ] InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    PackageID = ‘CSC0008E’ InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    BaseVar = ”, ContinueOnError=” InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    ProgramName = ‘Cmd.exe /c install.cmd C:’ InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    SwdAction = ‘0001’ InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    ResolveSource flags: 0x00000000 InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    SMSTSPersistContent: . The content for package CSC0008E will be persisted InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    DownloadOnDemand flag is true. Attempting to download content locally for Package CSC0008E. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Locations: Multicast = 0, HTTP = 1, SMB = 0. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Package Flags: 0x01000000 InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Multicast is not enabled for the package. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Trying http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    GetDirectoryListing() entered InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Initializing HTTP transport. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Setting URL = http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Address=http://Satanas.cschic-chocs.qc.ca, Scheme=http, Object=/SMS_DP_SMSPKG$/CSC0008E, Port=80. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Setting Authenticator. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Set authenticator in transport InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    WinHttp credentials set InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    CLibSMSMessageWinHttpTransport::Send: URL: Satanas.cschic-chocs.qc.ca:80 PROPFIND /SMS_DP_SMSPKG$/CSC0008E InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    401 – Unsuccessful with anonymous access. Retrying with context credentials. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Using thread token for request InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    401 – Unsuccessful with context credentials. Retrying with supplied credentials. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Request was successful. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    DAV response string is:
    http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/sccm?/CSC0008E/HTTP/1.1 200 OK10http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/sccm?/CSC0008E/0http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/install.cmdHTTP/1.1 200 OK00http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/install.cmdMon, 22 Feb 2016 14:27:49 GMT93http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64-pkgProperties.txtHTTP/1.1 200 OK00http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64-pkgProperties.txtFri, 17 Aug 2012 03:53:54 GMT622http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.cabHTTP/1.1 200 OK00http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.cabFri, 17 Aug 2012 03:55:34 GMT672192http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.xmlHTTP/1.1 200 OK00http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.xmlFri, 17 Aug 2012 03:53:54 GMT447http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/WSUSSCAN.cabHTTP/1.1 200 OK00http://Satanas.cschic-chocs.qc.ca/SMS_DP_SMSPKG$/CSC0008E/sccm?/WSUSSCAN.cabFri, 17 Aug 2012 03:57:08 GMT193162 InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    List of files to be downloaded InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    File: http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/install.cmd InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    File: http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64-pkgProperties.txt InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    File: http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.cab InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    File: http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.xml InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    File: http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/WSUSSCAN.cab InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    GetDirectoryListing() successfully completed InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Succeeded loading resource DLL ‘X:\sms\bin\x64\1033\TSRES.DLL’ InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    401 – Unsuccessful with anonymous access. Retrying with context credentials. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    401 – Unsuccessful with context credentials. Retrying with supplied credentials. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloading file /SMS_DP_SMSPKG$/CSC0008E/sccm?/install.cmd range 0-92 InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloaded file from http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/install.cmd to C:\_SMSTaskSequence\Packages\CSC0008E\install.cmd InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloading file /SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64-pkgProperties.txt range 0-621 InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloaded file from http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64-pkgProperties.txt to C:\_SMSTaskSequence\Packages\CSC0008E\Windows6.1-KB2685811-x64-pkgProperties.txt InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloading file /SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.cab range 0-672191 InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloaded file from http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.cab to C:\_SMSTaskSequence\Packages\CSC0008E\Windows6.1-KB2685811-x64.cab InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloading file /SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.xml range 0-446 InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloaded file from http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/Windows6.1-KB2685811-x64.xml to C:\_SMSTaskSequence\Packages\CSC0008E\Windows6.1-KB2685811-x64.xml InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloading file /SMS_DP_SMSPKG$/CSC0008E/sccm?/WSUSSCAN.cab range 0-193161 InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Downloaded file from http://Satanas.cschic-chocs.qc.ca:80/SMS_DP_SMSPKG$/CSC0008E/sccm?/WSUSSCAN.cab to C:\_SMSTaskSequence\Packages\CSC0008E\WSUSSCAN.cab InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    VerifyContentHash: Hash algorithm is 32780 InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Content successfully downloaded at C:\_SMSTaskSequence\Packages\CSC0008E. InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Resolved source to ‘C:\_SMSTaskSequence\Packages\CSC0008E’ InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Command line for extension .exe is “%1″ %* InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Set command line: Run command line InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Working dir ‘C:\_SMSTaskSequence\Packages\CSC0008E’ InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    Executing command line: Run command line InstallSoftware 2016-02-22 14:26:06 1140 (0x0474)
    InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    C:\_SMSTaskSequence\Packages\CSC0008E>Dism.exe /Image:”C:” /Add-Package /PackagePath:”C:\_SMSTaskSequence\Packages\CSC0008E\Windows6.1-KB2685811-x64.cab” /NoRestart InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    Deployment Image Servicing and Management tool InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    Version: 10.0.10240.16384 InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    Process completed with exit code 2 InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    Error: 2 InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    Unable to access the image. InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    Make sure that the image path and the Windows directory for the image exist and you have Read permissions on the folder. InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    The DISM log file can be found at X:\WINDOWS\Logs\DISM\dism.log InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    Command line returned 2 InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    ReleaseSource() for C:\_SMSTaskSequence\Packages\CSC0008E. InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    reference count 1 for the source C:\_SMSTaskSequence\Packages\CSC0008E before releasing InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    Released the resolved source C:\_SMSTaskSequence\Packages\CSC0008E InstallSoftware 2016-02-22 14:26:07 1140 (0x0474)
    Process completed with exit code 2 TSManager 2016-02-22 14:26:07 276 (0x0114)
    !——————————————————————————————–! TSManager 2016-02-22 14:26:07 276 (0x0114)
    Failed to run the action: Installer KDMF 1.11.
    The system cannot find the file specified. (Error: 00000002; Source: Windows) TSManager 2016-02-22 14:26:07 276 (0x0114)

    • Reply Stephan Wibier Feb 23,2016 12:36 pm

      Hi,

      how big is your Scratch dir?
      I have seen issues with this when your Scrath dir is the standard 32MB…
      I always enlarge mine to a minimum of 128MB

      /Stephan

      • Reply Alain Feb 23,2016 9:13 pm

        i added /set-SratchSpace:128 but i got the same error

        Failed to run the actio…..The system cannont find the file specified. Error 0x00000002

      • Reply Alain Feb 24,2016 3:48 am

        i also tried to create a scratch folder on the C in the task sequence and added /ScratchDir:%OSDisk%\Scratch to the command line but it does the same problem…

  5. Reply Stephan Wibier Oct 11,2016 1:56 pm

    Hi all,

    just an update from the field. During copy-paste there has slipped in an error in the DISM command line.

    The correct line should be:

    Dism.exe /Image:%1\ /Add-Package /PackagePath:”%~dp0Windows6.1-KB2685811-x64.cab” /NoRestart

    There is an extra backslash at the /Image node…
    I have updated the post above!

    /Stephan

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.