Apply drivers compressed with WIM during OSD with Configuration Manager

Introduction

Some time last year, I wrote a blog post on how I moved away from traditional driver management with Configuration Manager, into a more ‘modern’ approach using regular packages.

Then a few days ago, I stumbled upon a twitter conversation with some very clever people, mentioning how they compressed some of their deployments of huge application into .zip files. The conversation moved on, and some more clever people mentioned the idea of compressing the binaries with WIM.

That got me intrigued, so I wanted to explore that option on my own. The result is obviously this blog post. 🙂

P.S. For good measures and all: Compressing binaries with WIM to use with ConfigMgr was not my idea nor invention. This is just me exploring, learning and sharing that experience with anyone who’s interested.

Quick look into the past

Not too long ago, I did this to my environment; I deleted each and every driver and driver package that existed within ConfigMgr.

Instead I moved into regular packages and never looked back. Everything is explained in details in the post I reference above.

Moving into WIM

First step in this new journey, is to compress your driver binaries into WIM. Most people will already have the driver binaries logically sorted somewhere, so this is the easy part.

Below is an example, where I have exported all the drivers used by a Lenovo ThinkPad X1 Yoga 4th. You will have something similar I assume.

So in order for me to compress all of those files into WIM, I’m going to leverage DISM.exe. Whether you are leveraging dism.exe directly or the Powershell equivalents is your educated decision.

This is the dism.exe command I used specifically for the directory shown above:

  • NOTE: /Compress:max is up to debate and you might be better off skipping that, if you are using deduplication. People more clever than me, can elaborate on that topic.

The dism-command running will yield a result similar to below example:

The final .wim file will be similar to my example below:

A quick before and after comparison of the compression with WIM. The disk space savings are quite significant if you ask me. 🙂

Packages and Task Sequences

So how do I use all of this witchcraft in my own environment?

  • NOTE: I’ve chosen to take on the most simple approach I could think of. You can add whatever complexity is required, in order for proper error handling and more. For now this is just telling the ‘Drivers as WIM’-story.

The newly created .wim file is used with regular packages as well. Everything standard ConfigMgr. Below an example of packages containing one .wim file each. No program is needed.

The main Task Sequence is referencing a nested task sequence.

Note that, this is still in WinPE and thus BEFORE Setup Windows and Configuration Manager.

Nested Task Sequence

The nested task sequence is the interesting part, so this paragraph is broken down in each step.

Create Driver Directory

This step is simply creating the directory, to where we are going to mount the .wim content. I create the directory within the task sequence cache directory.

Lenovo Drivers

This step is just a new group, making sure the sub-steps is only carried out by Lenovo hardware.

Mount WIM X1 Yoga 4th Drivers

This step is mounting the .wim file, and makes the content available in the directory we created in the first step.

Apply Drivers

Another group, making sure that the sub-steps is only carried out if the drivers folder exists.

Apply Drivers Using DISM

This is where the drivers in the mounted WIM are being injected into the offline image. Delicious.

Unmount WIM

Unmount the WIM yet again and discard whatever is left. The drivers are no longer needed and this basically cleans itself up.

Conclusion

This will speed up OSD quite a bit, as well as save you some space on your hard drives.

Also, ZIP needs to be extracted. WIM does not. WIM only needs to be mounted. This means less space needed and less work in order to clean up.

ENJOY 🙂

11 thoughts on “Apply drivers compressed with WIM during OSD with Configuration Manager”

  1. Great post Martin. I am testing this out, and ran into an issue in which I was getting “Error 1920” relating to signatures when attempting to apply the drivers. I resolved it by using the “/EA” (“Extended Attributes”) DISM parameter when capturing the driver WIM.

    Reply
  2. Hi Martin,

    Just a quick question about creating the package.
    I assume you choose “Dot not create program” when you create the package.

    But how/when do you point out the .wim file then?
    Cause if you just add the file share in the Data Source, how can SCCM know it’s the .wim file it shall use?

    Reply
    • Hi, right, no program. I explicitly call the .wim file by name when I mount it. I’m not doing it exactly as decribed in the post, but close though. Would you be interested in having direct exported copies of my task sequences?

      Reply

Leave a Comment

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