Changes made to how drivers are applied to the FFU and WinPE Deployment media #375
rbalsleyMSFT
started this conversation in
UI Preview General Discussion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What Changed?
I just pushed a commit that changes how drivers are applied to the FFU and WinPE deployment media. In order to handle long driver paths (both long model names and deeply nested folders from driver manufacturers), I've opted to use SUBST to shorten the driver path. If you don't know what SUBST is, it simply associates a path with a drive letter. Think mapped network drive, but local.
I've also made a change to log the console output of dism when applying drivers (this goes back to using the Invoke-Process function and calling native dism instead of add-windowsdriver.)
Why Make This Change?
The reason I've moved to this approach is due to dism's inability to support long paths which is 260 characters. Some apps and tools can leverage putting a
\\?\in front of a path and that will allow the OS to resolve a long path. While dism can read a path with\\?\in it, if the path is too long, it will fail to process the path. FFUBuilder uses this trick in some places.The lack of long path support causes issues where dism will fail to add drivers to FFU/WIM files. In situations where it appears that dism has applied the drivers you selected, you might find that if you check device manager, there might be a number of things missing. You might also notice that WinPE isn't detecting your hard drive even though you expected the drivers to be there. Drivers with long paths would just silently fail to apply.
Example Logging
Here's what you'll now see in the FFUDevelopment.log
How This Works
Both dism and subst do not support long paths (and dism doesn't support recursing junctions), so a risk is that if you create a subst path that's too long you'll run into the same issue that you have with dism. So you have to make sure that the path you want to create with subst is shorter than 260 characters.
Based on looking at the above logging, you might wonder why not just create the SUBST path up to the model and just loop through each model if multiples exist (e.g.
C:\FFUDevelopment\Drivers\Dell\Dell Pro Desktops Dell Pro Micro Plus QBM1250-Dell Pro Micro QCM1250,Dell Pro Micro Plus XE QBM1250 (0D05)maps toZ:\) and while initially that might make sense, depending on the driver manufacturer, even they can create extremely long paths (Liteon camera drivers for Lenovo do this). This should hopefully solve for both long model names and long driver folder names.So the way this works is:
FYI
This will make it so adding drivers to the FFU or WinPE media will take a little longer since we have to run subst and dism many times (1 min vs 2 min or so). But in testing it's been much more reliable. There's also better logging now so you can see what was added or what failed.
I also contemplated normalizing model names, but that would end up in a game of whack a mole any time an OEM creates another model. The intent here is to have a process that would be OEM/model agnostic. I also tried junctions but dism fails to recurse through junctions, however it will work if you target a specific INF file.
So in the end, this seems to work the best in my testing so far. If you see anything strange, let me know, but this should hopefully fix some of the random issues where some drivers may not be applying as expected.
Beta Was this translation helpful? Give feedback.
All reactions