We have lots of Dell machines that don't seem to pick up all their drivers from the K2 Driver Feed.  The typical solution posted here seems to be to create post-install tasks that install specific drivers.  That's well and good if you want to manage a dozen different image options.  I don't want to do that, I want to have a single image option for our gold master image that will always install every driver for any model.

So I have devised a way that accomplishes this.  I have this script setup as a post-install task:

@ECHO OFF

title Installing any missing drivers, please wait...

FOR /F "tokens=2 delims==" %%A IN ('WMIC csproduct GET Name /VALUE ^| FIND /I "Name="') DO SET machine=%%A

ECHO Computer model: %machine%

net use w: "\\servername\share\%machine%" password /user:domain\user

call w:\install.cmd

net use w: /delete

The script uses the computer model as a variable to map to specific folders on a server share. Inside of these folders I have placed the drivers for each particular model that the K2 doesn't install (for whatever reason).  I have also placed a "install.cmd" file at the root of each folder with variations of the following commands:

@echo off

echo Installing video...
start /wait w:\video\setup.exe -s echo Installing chipset...
start /wait w:\chipset\setup.exe -s echo Installing USB 3.0...
start /wait w:\usb3.0\setup.exe -s echo Installing freefall sensor...
start /wait w:\freefall\setup.exe /s

When this post-install is used in conjunction with the RunOnceEx Convertor, the install.cmd file will be called during the first logon and will map to the share with the drivers.  Because the variable will change which folder gets mapped, I only need this one post-install task regardless of what model is being imaged.  As long as I have a "install.cmd" file inside of each folder, I can edit them separately and never touch the post-install task