My drivers can't install
-
Hello,
I follow this tutorial : https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed/4 with this information :
-
I don’t have fog.updateunattend
-
I download my HP drivers with HPImageAssistant
-
The HP drivers download on computer but Windows loads ad infinitum
I don’t have Unattend.xml (I’ve tried it with it and the result is always the same)
My setupcomplete.cmd :
REM INSTALLATION DES DRIVERS
pnputil.exe /add-driver “C:\Drivers*.inf” /subdirs /install
pnputil.exe /add-driver “C:\Drivers*.inf” /subdirs /install
pnputil.exe /add-driver “C:\Drivers*.inf” /subdirs /install
shutdown -t 0 -r
@echo offI try with/without shutdown, with one or two “pnputil.exe”
When I remove “pnputil.exe”, my other lines run smoothly
Please I’m lost
-
-
@IT-MAN The whole drivers install bit only works with an unattend of Windows.
The setupcomplete.cmd doesn’t “just run” because it exists. It is only used during Windows during OOBE setup and as such your script won’t do anything.
Not sure how you expected it to work?
-
@Tom-Elliott My script run because my others lines works without the three “pnputil.exe”.
But when i have this lines, my windows work undefinitely -
@IT-MAN I don’t follow what you mean?
"Other lines work without the three “pnputil.exe”?
First if the script is exactly as you have defined, then the issue is you don’t have the right information.
You script should look, per the tutorial:
REM INSTALLATION DES DRIVERS pnputil.exe /add-driver “C:\Drivers\*.inf” /subdirs /install pnputil.exe /add-driver “C:\Drivers\*.inf” /subdirs /install pnputil.exe /add-driver “C:\Drivers\*.inf” /subdirs /install shutdown -t 0 -r @echo off
That is not what you ahve.
That said, what do you mean the script “runs undefinitely”? I’m guessing (and i realize semantics but just trying to clarify) you mean “indefinitely” but is that really the case?
Installing drivers can take quite some time, so it could be minutes, to hours - generally. So what is your basis of running indefinitely?
If it takes more than 6 hours, I might say you’re seeing things run very slowly.
Now the reason the script pathing is important.
C:\Drivers*.inf is looking for anything called “C:\Drivers<anythinghere>.inf”
Where:
C:\Drivers\<anythinghere>.inf is what I am confident you are meaning. You want to delve into drivers folder and anything that has .inf in there (recursively as necessary)setupcomplete.cmd only runs after sysprep, so assuming your system is sysprepped, but you’re having to manually enter the options after you deploy the image, I don’t know.
You kind of left off all the details.
-
@IT-MAN
Where are you capturing your image and are you using sysprep to generalize the image without any drivers?The only way for driver injection to work on the windows side automatically is to use sysprep via an unattend.xml. Well I guess technically setupcomplete.cmd may run after setup without it according to https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/add-a-custom-script-to-windows-setup?view=windows-11 but utilize sysprep and an unattend.xml is far more robust.
It is possible to inject just the driver files into the disk in a post download script but without sysprep to kick it off, you can run into issues.
This requires capturing your image with sysprep and an unattend.xml. One thing you can do with unattend.xml is remove the drivers from the image so that conflicting drivers don’t exist, then you can add the pnputil portion in the specialize phase of sysprep.
This post is what I used and I added some of what I’ve done on top of it that may be of help.
https://forums.fogproject.org/topic/8889/fog-post-install-script-for-win-driver-injection
Also this one
https://forums.fogproject.org/topic/7740/the-magical-mystical-fog-post-download-scriptAt a high level, driver injection being dynamic per model has some assumptions
- You captured an image that doesn’t have model specific drivers (this is easiest when capturing from a VM and using sysprep)
- You have drivers organized within your /images nfs share
- You have a postdownload script that detects the model, finds the drivers, mounts the windows disk, and then injects them into a known path
- You have a method to kick off a script that installs the drivers into windows
- For example, I have a synchronouscommand in my specialize phase of my unattend that runs pnputil against the injected path, so drivers are loaded as early as possible in the process