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

    My drivers can't install

    Scheduled Pinned Locked Moved Unsolved
    FOG Problems
    3
    5
    325
    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.
    • I
      IT-MAN
      last edited by

      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 off

      I try with/without shutdown, with one or two “pnputil.exe”

      When I remove “pnputil.exe”, my other lines run smoothly

      Please I’m lost

      Tom ElliottT JJ FullmerJ 2 Replies Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @IT-MAN
        last edited by

        @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?

        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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        I 1 Reply Last reply Reply Quote 0
        • I
          IT-MAN @Tom Elliott
          last edited by

          @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

          Tom ElliottT 1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott @IT-MAN
            last edited by Tom Elliott

            @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.

            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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • JJ FullmerJ
              JJ Fullmer Testers @IT-MAN
              last edited by

              @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-script

              At 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

              Have you tried the FogApi powershell module? It's pretty cool IMHO
              https://github.com/darksidemilk/FogApi
              https://fogapi.readthedocs.io/en/latest/
              https://www.powershellgallery.com/packages/FogApi
              https://forums.fogproject.org/topic/12026/powershell-api-module

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

              144

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project