After finding truly great ways for managing drivers dynamically within MDT, I think I have stumbled upon one of the more efficient ways that offers granularity and simplifies management all at the same time.
In "CustomSettings.ini" use the following value
;Driver Settings (Based on the OSVersion, Image Architecture, Make, and Model of the device)
DriverGroup001=CreateBaseImage\%OSCurrentVersion_MajorMinor%\%ImageProcessor%
DriverGroup001=Deploy\%OSCurrentVersion_MajorMinor%\%ImageProcessor%\%Make%\%Model%
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Get OSCurrentVersion_MajorMinor
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not IsNull(oEnvironment.Item("ImageBuild")) And Not (oEnvironment.Item("ImageBuild") = "") Then
OSCurrentVersion = oEnvironment.Item("ImageBuild")
Else
OSCurrentVersion = oEnvironment.Item("OSCurrentVersion")
End If
If Not IsNull(OSCurrentVersion) And Not (OSCurrentVersion = "") Then
OSCurrentVersion = Split(OSCurrentVersion, ".")(0) + "." + Split(OSCurrentVersion, ".")(1)
oEnvironment.Item("OSCurrentVersion_MajorMinor") = OSCurrentVersion
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Place the above block of code into your respective "UserExit" scripts. It will generate a variable that contains the first two parts of the operating system version/kernel (6.1, 10.0, etc)
This is great because the value is set to use the built-in task sequence variable of "ImageBuild" that will contain the version of the windows image you are deploying and should that be blank, it will use the version from the current OS. Also, the built in variable of "ImageProcessor" will always come out as X86 or X64. Now your drivers will pull based on the OS Version, OS Architecture, Make, and Model of the device your are deploying. Provided that your Out-Of-Box Driver folders are created according to this pattern, all you would have to do is maintain the Out-Of-Box Driver folder structure and thus eliminate having to worry about changing driver paths within Task Sequences, etc!
Your resulting path can be found in the logs, but the path will expand to look like the following...
"Deploy\6.1\X86\Hewlett-Packard\HP ProBook 640 G1" when deploying (Windows 7 x86)
"Deploy\6.1\X64\Hewlett-Packard\HP ProBook 640 G1" when deploying (Windows 7 x64)
"Deploy\6.3\X64\Hewlett-Packard\HP ProBook 640 G1" when deploying (Windows 8.1 x64)
"Deploy\10.0\X64\Hewlett-Packard\HP ProBook 640 G1" when deploying (Windows 10 x64)
(That is only if Microsoft does not redesign how those builtin variables are named or formatted!)
Tested and working great using Microsoft Deployment Toolkit 2013 Update 1 and with Windows 10! We also deploy Windows 7 here, it is working there as well!
I hope this helps somebody! Have a blessed day folks!