Have Windows 10 sysprep install drivers from network share


  1. Posts : 11
    Windows 10
       #1

    Have Windows 10 sysprep install drivers from network share


    For Windows 10, version 20H1, build 19042.928, is it possible to have sysprep install drivers from a network share, during the sysprep operation? If so, which component of the answer file would I need to add?

    I have already tried Microsoft-Windows-PnpCustomizationsWinPE component, but that requires manually booting into Windows PE, which isn't feasible for deployment off multiple computers.

    Any advice would be appreciated.
      My Computer


  2. Posts : 2,773
    Windows 11 Pro, 21H2
       #2

    I believe that you may be mixing up some terms. Sysprep doesn't install drivers from anywhere, not even local. Sysprep is what prepares the system for imaging and optionally generalizes Windows.

    I believe that you are likely thinking about the installation process after you have sysprepped the system, is that correct? Another possibility (discussed below) is that you could inject the drivers that you need into your already sysprepped image. Those drivers would then automatically install during setup.

    I'm not really sure about a way to install drivers from a network location during the installation, but I can think of a few alternatives:

    1) At the very end of setup, Windows can run a script by the name of SetupComplete.cmd. I suppose that it might be possible to place commands in here to install drivers from a network location. You may have to experiment. But the heart of the script might have something like this:

    pnputil /add-driver \\MyServer\MyShare\*.inf /subdirs /install

    This would traverse all subdirectories of the location \\MyServer\MyShare and install all the drivers located there.

    I don't do this over a network, but I keep a folder with all drivers exported from a system. When I install Windows from scratch, I run the above command and it installs ALL drivers for my system with that single command.

    Note that I'm not 100% confident in this working via the script as I don't know if the script can install drivers without some user being logged on.

    2) Almost identical to the above, but without a script and after you have logged on for the first time: Simply establish a network connection to the location holding the drivers, then run the command noted above. With that one single command all drivers for the system can be installed.

    3) Another possibility, although not installing drivers from a network location, would be to simply inject all the drivers that your system needs into your sysprepped image. By doing this, all the drivers needed by your system will be installed during setup without the need to hit any locations, networked or even local, for drivers. They will simply be installed during setup.

    I can provide a step-by-step procedure to doing that if you are interested, but I'm not going to expend the effort unless you tell me that this is something you are actually interested in knowing how to perform

    Hope that provides some ideas and maybe someone else will have additional / better ideas

    EDIT: One point of clarification: You can inject drivers for multiple different systems into your sysprepped image. Only the drivers applicable to the system being installed on will actually get installed during installation.
      My Computers


  3. Posts : 11
    Windows 10
    Thread Starter
       #3

    Thanks for the ideas hsehestedt. In my previous Windows 10 images I had created, I had placed all drivers into a directory (such as C:\Drivers), and then I had added that path to the "DevicePath" property in "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion" registry key. This worked well, as sysprep would install the drivers, before OOBE phase. But I work in an organization where we have quite a lot Dell desktops and laptop models that we maintain, so every new model we purchased, I would add drivers to "C:\Drivers". This of course would increase the size of the image, resulting in longer imaging time.

    I was considering adding the UNC path to the network share to "DevicePath" property. Unfortunately the network share is password protected. Not sure if there is a way to include a domain username and password in conjunction with "DevicePath" property.

    pnputil /add-driver \\MyServer\MyShare\*.inf /subdirs /install
    This seems to be the best solution. I already have the image automatically logon to the local Administrator account anyway, since we have to perform a few additional tasks. I was thinking of disabling Windows Update downloading drivers when creating the image. I would still keep the basic network and storage drivers in C:\Drivers that Dell has available via WinPE, which would allow the system to traverse the network share post-sysprep. I can easily code a PowerShell script to check the computer model and have pnputil only look in the network folder for that particular computer model. Then I would re-enable Windows Update downloading drivers.

    Does this sound like a good idea?
      My Computer


  4. Posts : 2,773
    Windows 11 Pro, 21H2
       #4

    That sounds like it should work. Good luck to you!
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 09:55.
Find Us




Windows 10 Forums