Help with Win10 Driver injection
-
@Tom-Elliott I put C:\Windows\Drivers in my unattend, why would it look at C:\Windows\DRV ??
-
@Tom-Elliott Here is the full unattend
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="generalize"> <component name="Microsoft-Windows-PnpSysprep" 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"> <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices> <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls> </component> <component name="Microsoft-Windows-Security-SPP" 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"> <SkipRearm>1</SkipRearm> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-Deployment" 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"> <ExtendOSPartition> <Extend>true</Extend> </ExtendOSPartition> </component> <component name="Microsoft-Windows-Security-SPP-UX" 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"> <SkipAutoActivation>true</SkipAutoActivation> </component> <component name="Microsoft-Windows-Shell-Setup" 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"> <ComputerName>*</ComputerName> <CopyProfile>true</CopyProfile> <RegisteredOrganization>Microsoft</RegisteredOrganization> <RegisteredOwner>AutoBVT</RegisteredOwner> <ShowWindowsLive>false</ShowWindowsLive> <TimeZone>Eastern Standard Time</TimeZone> <ProductKey>Windows 10 Product Key</ProductKey> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-International-Core" 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"> <InputLocale>en-us</InputLocale> <SystemLocale>en-us</SystemLocale> <UILanguage>en-us</UILanguage> <UserLocale>en-us</UserLocale> </component> <component name="Microsoft-Windows-Shell-Setup" 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"> <AutoLogon> <Password> <Value>Password</Value> <PlainText>false</PlainText> </Password> <Enabled>true</Enabled> <LogonCount>1</LogonCount> <Username>CFA</Username> </AutoLogon> <OOBE> <HideEULAPage>true</HideEULAPage> <NetworkLocation>Work</NetworkLocation> <ProtectYourPC>1</ProtectYourPC> </OOBE> <UserAccounts> <AdministratorPassword> <Value>Password</Value> <PlainText>false</PlainText> </AdministratorPassword> <LocalAccounts> <LocalAccount wcm:action="add"> <Password> <Value>Password</Value> <PlainText>false</PlainText> </Password> <Description>Local Administrator</Description> <DisplayName>CFA</DisplayName> <Group>Administrator</Group> <Name>CFA</Name> </LocalAccount> </LocalAccounts> </UserAccounts> </component> </settings> <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:\Windows\Drivers</Path> </PathAndCredentials> </DriverPaths> </component> </settings> <cpi:offlineImage cpi:source="wim:c:/users/kyle.heath/desktop/windows%2010/sources/install.wim#Windows 10 Education" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
-
@kyle.heath said in FOG Post install script for Win Driver injection:
@Tom-Elliott I put C:\Windows\Drivers in my unattend, why would it look at C:\Windows\DRV ??
Because the picture you previously posted clearly says c:\windows\drv
-
-
@george1421 In my unattend or in the script picture I posted?
-
@kyle.heath The picture from your initial post.
But that aside. Are you syspreping the reference system? When you invoke the sysprep command are you pointing to the xml file you referenced below?
This process does work, I’m using it today (still).
-
Yes I’m using these two commands on my reference system.
cd c:\windows\system32\sysprep
sysprep.exe /generalize /oobe /shutdown /unattend:unattend.xmlI then select upload task in FOG and upload my image.
Right now I am using amd64_Microsoft-Windows-PnpCustomizationNonWinPE_Neutral. Should I be using amd64_Microsoft-Windows-PnpCustomizationWinPE_Neutral instead. I’m still confused as to how my unattend file says DRV when I have it saying Drivers
-
@george1421 Also those 2 pictures I posted on my initial post are YOUR pictures from the beginning of this. I referenced those when I was asking if I needed to add both of them to my unattend.
-
First I would put the unattend.xml file in C:\Windows\Panther windows will look there first. Then when you call sysprep include the full path to the unattend.xml file. There is no guarantee that will be the current directory during instllatio. Are you sure other elements of your unattend.xml file processing? Is it just driver injection that is failing?
You are using the right “amd64_Microsoft-Windows-PnpCustomizationNonWinPE_Neutral” location. The other one "amd64_Microsoft-Windows-PnpCustomizationWinPE_Neutral " is used for the winpe environment as if you were using MDT to deploy the image to the target computer. .
-
@george1421 Yes other parts of my unattend are working…the main thing being windows activation. I had my unattend in C:\Windows\System32\Sysprep. I can move it to C:\Windows\Panther if you think that makes a difference. It’s just the driver injection that’s failing. It’s moving them to the computer and putting them in a C:\Windows\Drivers folder, but not installing. I have them on the FOG server in folders. Do I need to remove the .exe from each folder (network, storage, input, audio) and put only that on the FOG Server.
-
@kyle.heath OK, what hardware are you deploying to?
Also please show me a screen shot or directory tree of how you have your drivers installed in c:\windows\drivers. I’m interested in seeing if your have the drivers in inf format.
-
@george1421 I’m deploying drivers to a Dell Latitude 3570. Here is a SS of what it looks like after the image is deployed. The drivers are there in folders, but they are not installed. I know this because I pointed a missing driver to this folder and it installed fine. It’s just not doing it during sysprep for some reason.
-
@kyle.heath I think, then, what you’re running into (possibly?) is the cart before the horse.
I ran into similar issues, where the installation would run through and install some drivers, but not all. Things like USB devices were not installing because the chipset was being installed after the usb device was installed.
Of course, there’s better ways to handle this, but my fix was to have the setup script run through the installation twice by running dpinst within the directory.
-
@Tom-Elliott So in the script I would need to have it run twice using dpinst…sorry but I’ve never used dpinst so I’m not sure what it is. How would I go about doing this?
-
@kyle.heath I don’t have an example, but i had to find the dpinst binary.
I placed it in the directory where the drivers were found.
I needed a dpinst.xml file too (which just told the dpinst binary how to run without my having to intervene).
-
I’m currently deploying WIn10 to an o920 just to confirm its still working as intended. I would have been done sooner but I had a forked up FOG server this AM.
-
@george1421 Ok please let me know if it still works. I’m deploying the image again, this time with sysprep in Panther. I’ll let you know if that changes the outcome.
-
dpinst.exe is a Driver Package INSTaller that comes from the Microsoft Windows Driver Kit
Different versions of the WDK are compatible with different versions of the Windows client OS and their equivalent server OS.
Microsoft Windows Driver Kit 7.1.0 (WXP)
Microsoft Windows Driver Kit 8.0 (Vista)
Microsoft Windows Driver Kit 8.1.u1 (Win7, Win8, Win8.1)
Microsoft Windows Driver Kit 10.0.10586.0 (Win7, 8, 8.1, 10)
Microsoft Windows Driver Kit 10.0.14393.0 (Win7, 8, 8.1, 10) but doesn’t come with a new dpinst.There are different versions for 32bit and 64bit OSes.
dpinst32.exe: installs and uninstalls driver packages. By default, the tool searches the current directory and tries to install all driver packages found. Usage: <path>\dpinst32.exe [/U INF-file][/S | /Q][/LM][/P][/F][/SH][/SA][/A][/PATH Path][/EL][/L LanguageID][/C][/D][/LogTitle Title][/SW][/? | /h | /help] /U INF-file Uninstall a driver package (INF-file). /S | /Q Silent (Quiet) mode. Suppresses the Device Installation Wizard and any dialogs popped-up by the operating system. /LM Legacy mode. Accepts unsigned driver packages and packages with missing files. These packages won't install on the latest version of Windows. /P Prompt if the driver package to be installed is not better than the current one. /F Force install if the driver package is not better than the current one. /SH Scans hardware for matching devices and only copies and installs those drivers for which a device is present. Only valid for Plug and Play drivers. /SA Suppress the Add/Remove Programs entry normally created for each driver package. /A Install all or none. /PATH Path Search for driver packages under the given path. /EL Enables all languages not explicitly listed in the XML file. /L LanguageID Tries to use the given language in all UI. Useful for localization tests. /SE Suppress the EULA. /C Dump logging output to attached Console (Windows XP and above). /D Delete driver binaries on uninstall. /SW Suppresses the Device Installation Wizard, the operating system might still pop-up user dialogs. /? | /h | /help Shows this help.
If a dpinst.xml is in the same path as the .exe when invoked, the dpinst.exe will use the values in that .xml. I use:
<?xml version="1.0" ?> <dpinst> <!-- equivalent to /sa --> <suppressAddRemovePrograms/> <!-- The following search and subDirectory elements direct DPInst to search all subdirectories (under the DPInst working directory) to locate driver packages. --> <search> <subDirectory>*</subDirectory> </search> <!-- The following language element localizes its child elements for the English (Standard) language. The child elements customize the text that appears on the DPInst wizard pages. --> <language code="0x0409"> <dpinstTitle>Device Driver Updater</dpinstTitle> <welcomeTitle>Welcome to the Device Installer!</welcomeTitle> <welcomeIntro>This wizard will walk you through updating the drivers for your device.</welcomeIntro> <installHeaderTitle>Installing the software for your device...</installHeaderTitle> <finishTitle>Congratulations! You finished installing your device drivers.</finishTitle> </language> <!-- equivalent to /sh --> <scanHardware/> </dpinst>
The important bit in this .xml is that it tells dpinst to recursively scan all subdirs at the location specified for all drivers.
By using that .xml along with this command in a post-sysprep or even mid-sysprep script I can force the computer to install drivers when I want to, instead of waiting for Windows to do it at its leisure:
<path>:\dpinst.exe /path "<the path to the drivers I want to use>" /q /se
DPInst will only install those drivers needed by your hardware, provided of course the necessary driver is in your path. Once completed, the script then deletes the folder(s) that held the original drivers, thus freeing up space.
I prefer to use DPInst to install drivers coming out of sysprep, instead of injecting with dism, pnputil or other methods because with each driver you inject, whichever method you use, the registry bloats and can in extreme cases cause the OS to become unstable; yes I’ve done this while prepping a HW-agnostic image ready to drop onto any of 26 very different platforms. This is an MS documented problem with at least Windows 7. I haven’t looked back on the methodology so I don’t know if it can still be an OS killer on Windows 8.1 or 10.
Installing drivers mid- or post-sysprep means I have a large 1-3GB repository to install from that is included in the image, but it means the devices are ready on my terms.
-
@kyle.heath Yes deploying to a 9020 does work correctly all drivers were loaded correctly after the reboot. I did have to do one additional reboot after imaging was complete because the AMT drivers was not loaded.
I compared the section of the xml regarding drivers between mine and yours and they are identical.
I have my sysprep command in a batch file so we have a consistent image build every time. This is the content of that batch file.
BTW: I’m deploying Win10 Ent CBB 1607 to this target computer.
net stop wmpnetworksvc c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /shutdown /unattend:C:\Windows\Panther\Unattend.xml
-
Just looking for differences here.
While our unattend.xml files differ quite a bit, there is something that stands out in your unattend.xml file that isn’t in mine.
My section
<settings pass="generalize"> <component name="Microsoft-Windows-PnpSysprep" 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"> <PersistAllDeviceInstalls>false</PersistAllDeviceInstalls> </component> </settings>
Your unattend file
<settings pass="generalize"> <component name="Microsoft-Windows-PnpSysprep" 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"> <DoNotCleanUpNonPresentDevices>true</DoNotCleanUpNonPresentDevices> <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls> </component> <component name="Microsoft-Windows-Security-SPP" 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"> <SkipRearm>1</SkipRearm> </component> </settings>
Note what you are doing with the drivers. I’m not saying one is right or the other is wrong. Just my kit does as it should.