Installing Windows OS with a "Drivers" folder to install drivers, without increasing the install.wim size

  • Thread starter Thread starter etiennevrooyen
  • Start date Start date
E

etiennevrooyen

Guest
I know it must be here somewhere, I'm looking, and my head hurts already. NTLite installing Windows 10/11 OS with a "Drivers" folder to install drivers, without increasing the install.wim folder size.
I used to inject the drivers; however, my Windows folder is now at ~25GB...this won't work, I am seeing that I can use a script placed somewhere to install from a drivers download folder on the same USB I'm using to install the correct / relevant drivers with affecting the Windows directory default size.
 
Copy this reg file, and Add under the Registry screen:
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1]
"Path"="C:\\Drivers"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\2]
"Path"="D:\\Drivers"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\3]
"Path"="E:\\Drivers"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\4]
"Path"="F:\\Drivers"

This instructs Windows to search for different driver folders (your USB drive isn't always guaranteed to have the same drive letter).

Your install image is 25GB, because you're probably importing the NVIDIA driver folder. Due to the way driver integration works, each INF file creates its own DriverStore folder instance. Because NVIDIA drivers don't just include the base driver but also the hefty graphics DLL's then every INF instance duplicates nearly 1 GB of overhead files.

Find the right NVIDIA *.inf file for your GPU, and only add that one file instead of importing the entire driver folder.
 
Thank you so much...I'm going to give this a go right now...yes, I read about the Nvidia drivers being such space hogs.
 
So this reg setting did not have the required outcome, see the attachments...my Windows directory size is enormous. I did notice the "Applying Updates" portion of the boot from USB took a very long time, all the drivers are installed but the Windows directory is too bloated.
 
Did you follow the directions exactly? The point is to copy the extracted drivers to a \Drivers folder on the USB device. Don't integrate them into the install image, unless they're storage drivers required for booting off the Windows drive.
 
Did you follow the directions exactly? The point is to copy the extracted drivers to a \Drivers folder on the USB device. Don't integrate them into the install image, unless they're storage drivers required for booting off the Windows drive.
100%...sorry I didn't share the USB screenshot, I created the "Drivers" folder in the root of the USB and did not integrate any drivers. On the NTLite screenshot, if you look at the "drivers" option, you'll see no numbers there...if I added drivers you'll see a count.
 
Check the size of C:\Windows\System32\DriverStore\FileRepository. Is there one subfolder taking up most of the space?
 
Adding an export of the Windows directory and FileRepository....
 
i don't know how you have bloated that folder up so much, mine is only 24.2GB
 
Your Intel graphics & audio drivers are taking the most disk space, and should be moved to the \Drivers folder.
 
Copy this reg file, and Add under the Registry screen:
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1]
"Path"="C:\\Drivers"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\2]
"Path"="D:\\Drivers"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\3]
"Path"="E:\\Drivers"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\4]
"Path"="F:\\Drivers"

This instructs Windows to search for different driver folders (your USB drive isn't always guaranteed to have the same drive letter).

Your install image is 25GB, because you're probably importing the NVIDIA driver folder. Due to the way driver integration works, each INF file creates its own DriverStore folder instance. Because NVIDIA drivers don't just include the base driver but also the hefty graphics DLL's then every INF instance duplicates nearly 1 GB of overhead files.

Find the right NVIDIA *.inf file for your GPU, and only add that one file instead of importing the entire driver folder.
Sorry for the late reply...I was busy with other burning issues, wanna give this another go...these registry keys "work" but seem to integrate all the drivers from the "Drivers" directory...so maybe want know are these registry settings added under the install.wim or boot.wim locations within NTlite?
Another test I did was clean vanilla Windows install with no driver integration and my Windows directory was ~8GB...after using Device Manager and installing the drivers from the Dell driver pack this directory increased to ~17GB...and this is only drivers for this Dell device, I can live with the 17GB Windows drive size...however not with a massive Windows directory because I integrated drivers via NTlite....my Dell model range is too different to create a USB for each.
I noticed Windows Deployment Service works 100% fine...no severely inflated Windows directory...would love to know how they do this and where the settings are made, I am sure NTLite attaches to the same entry points.
Another approach I was playing with is splitting my usb into a boot image location and a separate Drivers partition on the same USB, so I don't need to re-copy all the drivers every time I rufus the USB.
 
Sorry for the late reply...I was busy with other burning issues, wanna give this another go...these registry keys "work" but seem to integrate all the drivers from the "Drivers" directory...so maybe want know are these registry settings added under the install.wim or boot.wim locations within NTlite?
There are several places to inject a driver search path during install:
- From WinPE, using the unattended file's <DriverPaths>
- From the audit phase, using the unattended file's <DriverPaths>
- Integrating the same reg values into the boot.wim or install.wim​

What's the primary difference between driver search during boot or install WIM? Do you need boot-critical (SATA, NVME, USB, networking) drivers loaded in order for the Windows install to work?

Another test I did was clean vanilla Windows install with no driver integration and my Windows directory was ~8GB...after using Device Manager and installing the drivers from the Dell driver pack this directory increased to ~17GB...and this is only drivers for this Dell device, I can live with the 17GB Windows drive size...however not with a massive Windows directory because I integrated drivers via NTlite....my Dell model range is too different to create a USB for each.
It's been discussed many times before, but when you integrate drivers into an image – each INF instance gets its own DriverStore folder and a separate copy of the included DLL files. So if you have a driver family (with many INF files), then those DLL's are duplicated several times since each INF file creates a standalone instance.

With a driver search path, you're technically not integrating drivers into an image.

I noticed Windows Deployment Service works 100% fine...no severely inflated Windows directory...would love to know how they do this and where the settings are made, I am sure NTLite attaches to the same entry points.
WDS is a network-based install service, it keeps drivers on a network share and just inserts a task to scan for drivers. NTLite is mostly designed to work with ISO-based images, so WDS will use the same WIM files but replaces the ISO instance with a set of folder shares.

Another approach I was playing with is splitting my usb into a boot image location and a separate Drivers partition on the same USB, so I don't need to re-copy all the drivers every time I rufus the USB.
That's my approach. Copy your drivers to a top-level USB folder, and have the image just do a simple path search of possible media drive letters. Since you can't be guaranteed the USB's drive letter, a short list of drive paths is all you need.

Then your driver packs can be updated independently of the install images. Your biggest problem is when there are duplicate drivers (based on matching HWID's), one driver will always win – but it might not be the one you expected.
 
There are several places to inject a driver search path during install:
- From WinPE, using the unattended file's <DriverPaths>
- From the audit phase, using the unattended file's <DriverPaths>
- Integrating the same reg values into the boot.wim or install.wim​

What's the primary difference between driver search during boot or install WIM? Do you need boot-critical (SATA, NVME, USB, networking) drivers loaded in order for the Windows install to work?
There is no real need for this, only those "crappy" 2-in-one Dell Inspiron laptops might need it, but those can be done manually, I only have a few of them laying around.

It's been discussed many times before, but when you integrate drivers into an image – each INF instance gets its own DriverStore folder and a separate copy of the included DLL files. So if you have a driver family (with many INF files), then those DLL's are duplicated several times since each INF file creates a standalone instance.

With a driver search path, you're technically not integrating drivers into an image.


WDS is a network-based install service, it keeps drivers on a network share and just inserts a task to scan for drivers. NTLite is mostly designed to work with ISO-based images, so WDS will use the same WIM files but replaces the ISO instance with a set of folder shares.


That's my approach. Copy your drivers to a top-level USB folder, and have the image just do a simple path search of possible media drive letters. Since you can't be guaranteed the USB's drive letter, a short list of drive paths is all you need.

Then your driver packs can be updated independently of the install images. Your biggest problem is when there are duplicate drivers (based on matching HWID's), one driver will always win – but it might not be the one you expected.
I am tinkering with Yumi to create the multi-boot image, Rufus is going to wipe the entire USB every time...once I have a working formula, I will share...maybe even make a video.
 
The problem with YUMI or Ventoy is they use a custom boot loader, and hide full ISO images into a different layout for their own reasons. Which means it's no longer a trivial process to copy files to a static folder unless the USB drive is split with an extra partition for your driver files.
 
Correct, as NTLite can create an ISO image this is what I'll try, I need to see which way works best, with Yumi this entire ISO is copied onto the drive, so in my head I'm stuck with what happens to the unattended.xml that that is now wrapped into the ISO and how it will be able to read the USB "Drivers" folder...I have quite a few unknowns I need to play with.
 
That's the exact problem. These "select an ISO" solutions only work once (after you pass their custom boot menu and it mounts the selected ISO volume). The moment that Windows exits from WinPE and restarts, the USB drive no longer sees the same ISO since YUMI or Ventoy isn't there to auto-mount the ISO.

If you created a fixed partition at the end of the drive, and allowed YUMI to manage to first half; then the last volume will always be visible whenever the drive is plugged in. Since you're provided a long enough list of possible drive letters, this volume should be found.
 
Back
Top