11 Replies Latest reply on Apr 29, 2009 4:35 AM by ahe

    Help Getting Drivers Installed

    Apprentice

      So I've been battling with Provisioning for a while now and because I'm new to it, things seem to take a bit longer to figure out. What I'm battling right now is the installation of the drivers. I've attached my template and my sysprep.inf file for reference. What my template is doing is Deleting all partitions, Installing a very basic image, copying the drivers over to the C:\Drivers folder on the machine, Configuring the Target OS, then Installing the Agent. What I'm trying to figure out is what calls the drivers to be installed. Isn't it the sysprep.inf file? I was under the impression that during hte mini-setup these drivers would get installed. If anyone could explain this part to me or steer me into the right direction. Also, please comment on the order of action items. Is it okay to do things in this fashion? Again, I'm young when it comes to provisioning so any advice would be greatly appreciated.

       

      See attachments for reference.

        • 1. Re: Help Getting Drivers Installed
          Employee

          Many of us have been there and can show the scars...

           

          The reason why this doesn't work is that OemPnpDriversPath is used at sysprep time, not at mini-setup time.

           

          With very few exceptions, the info in sysprep.inf is used at mini-setup time only. For example, we all know that it doesn't matter what you had in ComputerName at sysprep time. Your provisioning template can inject a new sysprep.inf with the ComputerName that you want. The same is true for nearly everything else in sysprep.inf. One of the rare exceptions is OemPnpDriversPath. Mini-setup takes no notice of OemPnpDriversPath. Instead, it looks at the DevicePath key in the registry. At the time you syspreped your master machine, sysprep read out OemPnpDriversPath from sysprep.inf and wrote it to the DevicePath registry key. Injecting a sysprep.inf at deployment time with a new OemPnpDriversPath has no effect.

           

          If you're injecting drivers at deployment time, you need to enumerate them in the DevicePath key in the registry, not in sysprep.inf OemPnpDriversPath.

           

          You are in effect trying to reinvent Hardware Independent Imaging, which is documented in detail here: http://community.landesk.com/support/docs/DOC-2714. Look at the ldprep tool that comes with the package...

          • 2. Re: Help Getting Drivers Installed
            Apprentice

            I appreciate this advice. I actually had a copy of this document but it was an older revision that I don't believe included Provisioning. This revision has been extremely helpful in understanding what I need to do. I do have one question though about the LDPrep Action. My driver copy will copy over the name of the machine. Lets say...Optiplex 755. The folder structure is like this

             

            C:

            • Drivers
              • Optiplex 755
                • PnP
                  • Audio
                  • Video
                  • Network
                • msd
                • Setup
                  • Audio
                  • Video
                  • Network

             

            The sample template suggests to point the /path=%DRIVERS%\PnP

             

            My understanding was that C:\Drivers was assumed to be %Drivers%

             

            So If I put the template path to C:\Drivers will it search for any .inf files that live in that directory?

             

            I hope this makes sense. Let me know if I need to clarify.

             

            Thanks for all the help.,

            • 3. Re: Help Getting Drivers Installed
              Apprentice

              Hi Paul --

               

              Though the document you have for HII may be a bit 'dated', the concepts still apply -- provisioning is simply the method you're using to deploy your image, and technically doesn't change the way that you prepare it.  In short, what you do when you create your base standard operating environment (SOE) image is to run sysprep and then ldprep.  capture that image.  Your provisioning template should:

              1. Map drives to the network shares for the imaging tool and the image
              2. Prepare the hard drive
              3. push the image down to the hard disk
              4. mount the drive to ensure you can write to it
              5. copy the drivers from the network to the c:\drivers\ directory (this is the default directory used by ldprep).

               

              What LDPrep does is scans the contents of C:\drivers\ for driver files and adds the path to the oempnpdriverspath key in the registry before mini setup runs, making it dynamic.  Essentially , this is what you do when your sysprep.inf  has the oempnpdriverspath flag in it, except it statically adds the paths to the registry before you capture the image, meaning you can't change it.

               

              Does that help you out any?

              • 4. Re: Help Getting Drivers Installed
                Apprentice

                Dave,

                 

                I appreciate your response. I do have the updated white paper that includes Provisioning. I already have my Image created and tasked an action. What I'm working with is the Execute File Action that will work with the LDPrep program. You comment of What LDPrep does is scans the contents of C:\drivers\ for driver files is sort of what I was asking. My response question to you is if my actual drivers are in C:\Drivers\%ComputerModel%\%TypeOfDriver%  Will it scan those folders too?

                 

                My point is that my driver files aren't in C:\Drivers

                 

                They are actually in a Subdirectory of C:\Drivers called C:\Drivers\Dell 755\PnP\Network\Driver .inf files live here.

                 

                Does this make sense?

                 

                Thank you again for your help.

                • 5. Re: Help Getting Drivers Installed
                  Employee

                  Or in other words, if you allow me to rephrase your question, does ldprep scan recursively? Yes it does. It will find your inf files even if they are a few levels of subfolders below the patch that you give it.

                  • 6. Re: Help Getting Drivers Installed
                    Apprentice

                    This was exactly what I was wondering. Thank you so much for your help. I appreciate all of this useful information. I hope I can now get it to work I'll keep you posted.

                    • 7. Re: Help Getting Drivers Installed
                      Apprentice

                      in short- the answer to your question is 'yes'.  Do yourself a favor and try to shorten the paths in c:\drivers. The size of the registry key storing the oempnpdrivers path is limited to 4056 characters or something close to that.  Have the copy file action copy the
                      networkserver\share\model\network to c:\drivers\network.

                      • 8. Re: Help Getting Drivers Installed
                        Apprentice

                        in short- the answer to your question is 'yes'.  Do yourself a favor and try to shorten the paths in c:\drivers. The size of the registry key storing the oempnpdrivers path is limited to 4056 characters or something close to that.  Have the copy file action copy the
                        networkserver\share\model\network to c:\drivers\network.

                        • 9. Re: Help Getting Drivers Installed
                          Apprentice

                          Very good advice. Problem is that I would like to use one template for all my Desktops which causes me to better define folders. I do believe if I knew VB I could fix this issue however I dont ;(

                          • 10. Re: Help Getting Drivers Installed
                            Apprentice

                            Paul --

                             

                            Though I don't always use this method to detect the hardware type at customer sites, I've found that it works OK for Hardware Independent Imaging.  Best of all, No VBScripting is required:

                             

                            - Once windows PE loads and your provisioning template kicks off, map a share to the ldlogon directory (presumably you'd be mapping a share to the core to use the imaging tool anyway) and run a full inventory scan using ldiscn32.exe from the ldlogon directory.  I've noted that some issues exist with inventory scanning directly from the core in 8.8 depending upon the service pack level.  This post speaks to the files to add to the ldlogon directory to make it work ok (http://community.landesk.com/support/message/20437#20437)

                             

                            -Force the scan to run first, then push the image.  Reason being that the image deployment will take some minutes, and that gives the inventory scan data some time to populate into the database at sites with busy core servers.

                             

                            - use a file copy operation using template variables to determine the path for the manufacturer and model.  If you create template database replacement variables for "computer"."system"."manufacturer" and "computer"."system"."model", you can use the copy file operator to copy from %manufacturer%\%model%\ to c:\drivers.  If you then model your driver directory paths at the top level to match what's in inventory for these fields, it will copy the drivers.

                             

                            LDPrep should do the rest~

                            • 11. Re: Help Getting Drivers Installed
                              ahe Expert

                              Hello David,

                               

                              as Jan Buelens mentioned in the HII doc

                               

                              Rev 9. (Dec 16, 2008) Major changes.
                                Stopped using ldiscn32 (the inventory scanner) to detect machine type. As of LDMS 8.8 SP2,
                              ldiscn32 no longer works under WinPE. Most likely it's only a matter of a missing DLL or so. But
                              in view of other issues, I decided to design out all dependencies on the inventory.

                               

                              you can try to get the model with the CopyDrivers program or a own small AutoIt script..  (s. the short not tested code fragment)

                               

                              Opt("GUIOnEventMode", 1)
                              #include <GUIConstants.au3>
                              
                              $wbemFlagReturnImmediately = 0x10
                              $wbemFlagForwardOnly = 0x20
                              $colItems = ""
                              $strComputer = "localhost"
                              
                              ; check for computer model
                              $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
                              $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL", _
                                                                        $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
                              
                              If IsObj($colItems) then
                                 For $objItem In $colItems
                                     $Model=$objItem.Model
                                 Next
                              Else
                                   $Model="unknown"
                                   exit
                              Endif
                              ;now you can start something with the Model name... here a message box
                              MsgBox(4096, "Model", $Model)
                              
                              ;or a file copy to a model specific path...
                              $driverpath="c:\" & $model & "\PNP\"
                              $networkpath="\\servershare\" & $model
                              FileCopy($networkpath, $driverpath, 8)
                              
                              ; or something else
                              ; . . .
                              
                              

                               

                              I don't see the problem of the path length in "oempnpdrivers" if you use the drivers for the specific model only. If you add all drivers for all hardware types, you'll get in trouble :-)

                               

                               

                              Regards

                              Axel