• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Win10 1607 LTSB not finding drivers

    Scheduled Pinned Locked Moved Solved
    Windows Problems
    windows 10 driver sysprep
    2
    4
    792
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lukebarone
      last edited by lukebarone

      I created an image based on the LTSB 1607 Windows 10. I can deploy it fine to the first of a fleet of new machines - Dell Latitude 5590’s.

      I have the fog.drivers script running after imaging, and the C:\Drivers folder is populated, so I know FOG is copying the drivers.

      However, Windows is not looking in that folder during the first boot up, and installing the drivers it needs.

      unattend.xml (the part that mentions the Driver path):

      ...
          <settings pass="offlineServicing">
              <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                  <DriverPaths>
                      <PathAndCredentials wcm:action="add" wcm:keyValue="1">
                          <Path>C:\Drivers</Path>
                      </PathAndCredentials>
                  </DriverPaths>
              </component>
          </settings>
      ...
      

      The tree of files created (trimmed):

      C:\
        Drivers\
          x64\
            audio\
            chipset\
      ...
            storage\
            video\
      

      fog.drivers Script:

      #!/bin/bash
      ceol=`tput el`;
      manu=`dmidecode -s system-manufacturer`;
      case $manu in
          [Ll][Ee][Nn][Oo][Vv][Oo])
              machine=$(dmidecode -s system-version)
              ;;
          *[Dd][Ee][Ll][Ll]*)
              machine=$(dmidecode -s system-product-name) #pruduct is typo, just realized sorry :(
              ;;
          *)
              machine=$(dmidecode -s system-product-name) # Technically, we can remove the dell one as it's the "default"
              ;;
      esac
      [[ -z $machine ]] && return #assuming you want it to break if it is not lenovo or dell?
      machine="${machine%"${machine##*[![:space:]]}"}" #Removes Trailing Spaces
      
      #############################################
      # Quick hack to find out if the installed OS image is a x86 or x64
      system64="/ntfs/Windows/SysWOW64/regedit.exe" # sloppy detect if 64bit or not
      [[ ! -f $system64 ]] && arch="x86" || arch="x64"
      
      #############################################
      #this section has been updated to bring the osn names in line
      # with how the Dell CABs are defined
      case $osid in
          5) osn="win7" ;;
          6) osn="win8" ;;
          7) osn="win8.1" ;;
          9) osn="win10" ;;
      esac
      
      #############################################
      dots "Preparing Drivers"
      # below creates local folder on imaged pc
      # this can be anywhere you want just remember
      # to make sure it matches throughout! (case IS important here)
      if [ $osid -eq 9 ]
      then
          clientdriverpath="/ntfs/Drivers"
      else
          clientdriverpath="/ntfs/Windows/inf/Drivers"
      fi
      remotedriverpath="/images/drivers/$machine/$osn/$arch"
      
      [[ ! -d $clientdriverpath ]] && mkdir -p "$clientdriverpath" >/dev/null 2>&1
      echo -n "In Progress"
      
      #there's 3 ways you could handle this,
      #driver cab file, extracted driver files or both
      #so on the server put extracted driver files to match below folder tree
      #i.e. Model Latitude E5410, Windows 7 x86 image would be:
      #/fog/Drivers/Latitude E5410/win7/x86
      
      rsync -aqz "$remotedriverpath" "$clientdriverpath" >/dev/null 2>&1
      [[ ! $? -eq 0 ]] && handleError "Failed to download driver information for [$machine/$osn/$arch]"
      
      #this next bit adds driver location on pc to devicepath in registry (so sysprep uses it to reference)
      # remember to make devicepath= match the path you've used locally
      #also do not remove %SystemRoot%\inf
      #and to add more locations just use ; in between each location
      
      regfile="/ntfs/Windows/System32/config/SOFTWARE"
      key="\Microsoft\Windows\CurrentVersion\DevicePath"
      devpath="%SystemRoot%\DRV;%SystemRoot%\inf;";
      reged -e "$regfile" &>/dev/null <<EOFREG
      ed $key
      $devpath
      q
      y
      EOFREG
      echo -e "\b\b\b\b\b\b\b\b\b\b\b${ceol}Done"; # this just removes "In Progress and replaces it with done :-)"
      

      What can I do to get my new images to detect the drivers, and automatically install them correctly?

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by

        That’s interesting, I would have though 1607 still worked. If you look at this post: https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed/4 You will see that 1703 no longer works with the unattend.xml settings so you need to add the following to the setupcomplete.cmd file.

        pnputil.exe /add-driver "C:\Drivers\*.inf" /subdirs /install
        pnputil.exe /add-driver "C:\Drivers\*.inf" /subdirs /install
        

        Calling the pnputil command twice should be sufficient to find all of the hardware. I don’t know why MS moved away from the unattend.xml file pointing to the drivers. I’m sure there was a good reason.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        L 1 Reply Last reply Reply Quote 1
        • L
          lukebarone @george1421
          last edited by

          @george1421 OK, I’m re-capturing my image, and then I’ll deploy it. I added the commands for PNPUTIL before turning on the Fog Service, as I know it took quite a while to run after I logged in. I’ll report back once I know whether or not this works.

          L 1 Reply Last reply Reply Quote 0
          • L
            lukebarone @lukebarone
            last edited by

            This worked! Thanks!

            I’m disappointed Microsoft’s method doesn’t work anymore, it was super helpful when we were testing Windows 10 at my previous site…

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post

            241

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project