Inject drivers via Fog
-
Hello All,
I new user in FOG Project and i want inject drivers in my deployments.
I following the link: https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed
But I don’t understand where I should do this in this configuration:
Can help-me with this step?
Thanks Team
-
post taken from this thread: https://www.elevenforum.com/t/automated-windows-11-installation-with-post-installation-script.28219/
"The normal sequence for Windows Post-Setup:
- Exit specialize pass, and run OOBE
- Run C:\Windows\Setup\Scripts\SetupComplete.cmd, except when Windows finds an OEM license key and it’s skipped entirely
- Begin user provisioning for the first logon user
- Run RunOnce or Run registry tasks
SetupComplete.cmd would be ideal for you, it’s right after OOBE but before any user profiles are provisioned. But the problem is Windows deliberately skips SetupComplete when it detects an OEM setup."
There are several ways to do the injection the most correct place is the setupcomplete.cmd file. But if you have an OEM licensed install that file is skipped.
The other option is to add the driver injection (only one call to pnputil is really needed in my experience) is if/when you use the unattend.xml file. There is a first run section where you can call applications at first login, but you must couple that step with autoadminlogin function, so as soon as OOBE finishes autoadminlogin logs in the administrator account once to run the firstrun section of the unattend.xml file. This way is a bit more complicated to setup. If you can get the setupcomplete.cmd file to run its much easier of a setup
-
@george1421 Hello,
Thanks for your help.
To use the unattend.xml can we follow this steps?
https://forums.fogproject.org/topic/11126/using-fog-postinstall-scripts-for-windows-driver-injection-2017-ed and use the scripts:-
fog.updateunattend
-
Unattend.xml
Thanks for your support
-
-
@diogo-seabra said in Inject drivers via Fog:
To use the unattend.xml can we follow this steps
This is kind of an open ended question so I’m not sure how to answer within context.
The fog.updateunattend script is intended to update the unattend.xml script at deployment time, like system name, OU to bind to, etc.
If you want to use the unattend.xml script to “do things” post deployment, that is not connected to the fog.updateattend script.
For reference here is my windows 7 unattend.xml (I know, but the file really hasn’t changed much between win7 and win11.
https://forums.fogproject.org/post/112435The interesting sections of the file are this:
<AutoLogon> <Password> <Value>**REMOVED BY ME**</Value> <PlainText>false</PlainText> </Password> <Enabled>true</Enabled> <Username>**REMOVED BY ME**</Username> <Domain>**REMOVED BY ME**</Domain> <LogonCount>1</LogonCount> </AutoLogon>
This sets it up for the administrator account to auto login once. Doing this allows the next important section to run.
<FirstLogonCommands> <SynchronousCommand wcm:action="add"> <Description>Move to OU</Description> <Order>1</Order> <CommandLine>cscript.exe /B c:\windows\buildscripts\SetOUTo.vbs "some_new_ou"</CommandLine> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>2</Order> <Description>Activate Windows</Description> <RequiresUserInput>false</RequiresUserInput> <CommandLine>cscript /B C:\windows\system32\_slmgr.vbs /ato</CommandLine> </SynchronousCommand> <SynchronousCommand wcm:action="add"> <Order>3</Order> <CommandLine>shutdown.exe -r -t 30 /c "The computer will RESTART in 30 seconds"</CommandLine> <Description>Reboot at end</Description> <RequiresUserInput>false</RequiresUserInput> </SynchronousCommand> </FirstLogonCommands>
While this section doesn’t speak directly to running the pnputil.exe command, you could add it to the list of steps pretty easy, possibly in the first section with “description move to ou”. The auto login command allows this section to run once the desktop is configured. The last step of the first run section tells windows to reboot after executing everything else. The concept will be the same or you, run the pnputil command with the proper switches and then the last step will be to reboot loading the proper drivers at restart.