Unsolved post-installation script
Is there a way for the fog server to run a post-installation script? For example, I need to inject the HP and Lenovo drivers into the image, and I already downloaded the drivers. Everything that I’ve tried post-installation script hasn’t worked.
#!/bin/bash # Path to Windows image file WINDOWS_IMAGE="/path/to/windows_image.wim" # Mount directory for Windows image MOUNT_DIR="/mnt/windows_image" # Path to HP drivers directory HP_DRIVER_DIR="/path/to/hp_drivers" # Path to Lenovo drivers directory LENOVO_DRIVER_DIR="/path/to/lenovo_drivers" # Mount the Windows image mkdir -p $MOUNT_DIR sudo mount -o loop $WINDOWS_IMAGE $MOUNT_DIR # Inject HP drivers sudo dism /Image:$MOUNT_DIR /Add-Driver /Driver:$HP_DRIVER_DIR /Recurse # Inject Lenovo drivers sudo dism /Image:$MOUNT_DIR /Add-Driver /Driver:$LENOVO_DRIVER_DIR /Recurse # Unmount the Windows image sudo umount $MOUNT_DIR rmdir $MOUNT_DIR echo "Driver injection complete."
mod note: fixed the code for readability
@professorb24 I have a tutorial on how to do this with Dell computers, but the concept is almost the same for other vendors. The key is to have the driver files in inf format so pnputil.exe can install them. Lenovo use to have drivers in .exe format and not .inf format. That made things a bit harder when I was trying to setup lenovo computers.
Looking at the script and it doesn’t appear to do anything. other than mount a wim image, but also be aware that the post install script runs withing a linux environment so it can’t directly interact with windows or the .wim file.
Your post install script should copy the drivers over to the target computer after the image is placed on the target computer. All that FOG can do is leave files behind for windows to find them during OOBE/WinSetup.