1 2 Previous Next 17 Replies Latest reply on Mar 14, 2008 7:11 AM by technobabble

    HII using WinPE - unable to get drivers to copy

    Rookie

       

      Using HII whitepaper from droppedpackets.org as a reference - trying to use the WMI and vb scripting to determine machine type on HP D530 SFF. Running getmachinetype.vbs results in:

       

      Set Manufacturer=Hewlett-Packard

      Set Model=DSDT

      Set Version=

       

      I've edited the copydrivers.bat as follows:

       

      REM copydrivers.bat

      REM *** copy common drivers ***

      xcopy /s /i i:\drivers\common c:\drivers

      cscript GetMachineType.vbs

      call setenv.bat

       

      if /i "%Model%"=="DSDT" (

      REM *** copy drivers unique to D530SFF P2.8 ***

      xcopy /s i:\drivers\Hewlett-Packard\DSDT c:\drivers

      )

       

      Drivers are stored under:


      lansrv\images\drivers\Hewlett-Packard\COMMON\nic


      lansrv\images\drivers\Hewlett-Packard\DSDT\audio


      lansrv\images\drivers\Hewlett-Packard\DSDT\graphics

       

      The only drivers that copy are the common drivers - the rest do not copy.

       

      Any ideas would be appreciated - thank you.

       

       

        • 1. Re: HII using WinPE - unable to get drivers to copy
          Apprentice

           

          Are the contents of the %model% varable the same name as your folder?

           

           

          if %model% is = "Lattitude D510" then the folder needs to be named "Lattitude D510" you can run the batch file in the WINPE environment and then echo %model% to test it.  I would try running the copy command manually too.

           

           

           

           

           

           

           

           

          1 of 1 people found this helpful
          • 2. Re: HII using WinPE - unable to get drivers to copy
            Rookie

            Good suggestions.  Ran the "getmachinetype" script in WinPE environment and it returned a value of DSDT which is also the name of the folder under drivers...  Also manually ran the copy command and it appears to be matching the model correctly...

            • 3. Re: HII using WinPE - unable to get drivers to copy
              Apprentice

               

              Add these switches: /E /S /I

               

               

              Example

               

               

              if /i "%Model%"=="Latitude D420" (

              xcopy  "H:\drivers\Dell Inc\Latitude D420" c:\drivers /E /S /I

              )

               

               

               

               

               

              Hope it helps.

               

               

              • 4. Re: HII using WinPE - unable to get drivers to copy
                Rookie

                Well here's what I ended up with:

                 

                if /i "%Model%"=="DSDT" (

                REM *** copy drivers unique to D530SFF P2.8 ***

                xcopy /s "i:\drivers\Hewlett-Packard\DSDT" c:\drivers /E /S /I

                )

                 

                Deployed and still no luck...

                • 5. Re: HII using WinPE - unable to get drivers to copy
                  Apprentice

                  Does it copy down a blank Drivers folder or the command does not complete at all? What happens when you run it manually?

                  • 6. Re: HII using WinPE - unable to get drivers to copy
                    Jack.rotherham Specialist

                    On the command line you Don't want the /s or /S as these exclude empty subfolders. The subfolders are covered by the /E switch which includes all subfolders. What type of image are you using for the process? If it is a bit by bit based image (Like an ImageW image) then you will need to have an additional diskpart command to mount the partition prior to copying files over, whereas if it is a file by file base image (Like an ImageX image) Then you won't need to do any additional partition mounting.

                    • 7. Re: HII using WinPE - unable to get drivers to copy
                      Apprentice

                      Does your Drivers Folder exist?  I had to add a mdir C:\Drivers line to get the copy to work.

                      • 8. Re: HII using WinPE - unable to get drivers to copy
                        Rookie

                        It only copies down the folder and files that are located under I:\drivers\Common - puts them under c:\drivers so that's working. It does not copy the files specific to the model which are located under I:\drivers\Hewlett-Packard.

                         

                        Here is a portion of the code from the script:

                         

                         

                        ;this causes LANDesk to only copy the specific drivers necessary for the specific platform...***HII Imaging**** REMEXEC371=sdclient /f /o /dest=x:\ldclient\getmachinetype.vbs /p=http://%CUSTJOBHOSTIP%/landesk/files/getmachinetype.vbs REMEXEC372=sdclient /f /o /dest=x:\ldclient\copydrivers.bat /p=http://%CUSTJOBHOSTIP%/landesk/files/copydrivers.bat REMEXEC373=cmd /c x:\ldclient\copydrivers.bat

                         

                         

                        I verified that script support is available in the WinPE image.

                         

                         

                        When I run the commands manually and run copydrivers.bat, it errors out:

                         

                         

                        Input Error: Can not find script file "I:\i386\system32\GetMachineType.vbs". X:\i386\system32\call setenv.bat 'Setenv.bat' is not recognized as an internal or external command, operable program or batch file.

                        • 9. Re: HII using WinPE - unable to get drivers to copy
                          Rookie

                          Yes, the drivers folder gets created when the I:\common\Drivers folder gets copied.

                           

                          Just can't get it to copy the model specific drivers.

                           

                          Thank you...

                          • 10. Re: HII using WinPE - unable to get drivers to copy
                            Rookie

                            I looked at that same GetMachineType script and don't know why you need to do all this reading and writing to batch files when your already using vbscript to get the model of the pc. I just modified the vbscript to do the file copy and it works just fine. I could be wrong but it seems a much cleaner way to do it.

                             

                             

                            I use the script below to copy drivers to two locations. One for pnp drivers and the other for anything I run from cmdlins.txt

                             

                             

                             

                             

                             

                             

                            Dim model,filesys,newfolder,newfolderpath,driverpath

                             

                            strComputer = "."

                             

                            Set objWMIService = GetObject("winmgmts:" _

                            & "{impersonationLevel=impersonate}!
                            " & strComputer & "\root\cimv2")

                             

                            Set colRows = objWMIService.ExecQuery ("SELECT * FROM Win32_ComputerSystem")

                            For Each Row in colRows

                            model = Row.Model   

                            model = Trim(Row.Model)

                            model = UCase (model)

                            Next

                             

                            sourcedriverpath = "I:\HII\drivers\" & model & "\pnp"

                            destdriverpath = "c:\drivers\"

                             

                            sourceoem = "I:\HII\drivers\" & model & "\$oem$"

                            destdriveroem1 = "c:\sysprep\i386\"

                            destdriveroem2 = "c:\sysprep\i386\$oem$"

                             

                            set filesys=CreateObject("Scripting.FileSystemObject")

                             

                            'Create driver pnp folder if doesn't exist

                            If Not filesys.FolderExists(destdriverpath) Then

                            Set newfolder = filesys.CreateFolder(destdriverpath)

                            End If

                             

                            'Create &oem& folder if dosn't exist

                            If Not filesys.FolderExists(destdriveroem1) Then

                            Set newfolder = filesys.CreateFolder(destdriveroem1)

                            End If

                             

                            If Not filesys.FolderExists(destdriveroem2) Then

                            Set newfolder = filesys.CreateFolder(destdriveroem2)

                            End If

                             

                             

                            Select case model

                            Case "OPTIPLEX 745"

                            filesys.CopyFolder sourcedriverpath, destdriverpath

                            filesys.CopyFolder sourceoem , destdriveroem2

                             

                            Case "OPTIPLEX 755"

                            filesys.CopyFolder sourcedriverpath, destdriverpath

                            filesys.CopyFolder sourceoem, destdriveroem2

                             

                            Case "OPTIPLEX GX520"

                            filesys.CopyFolder sourcedriverpath, destdriverpath

                            filesys.CopyFolder sourceoem, destdriveroem2

                             

                            Case "OPTIPLEX GX280"

                            filesys.CopyFolder sourcedriverpath, destdriverpath

                            filesys.CopyFolder sourceoem, destdriveroem2

                             

                            Case "OPTIPLEX GX270"

                            filesys.CopyFolder sourcedriverpath, destdriverpath

                            filesys.CopyFolder sourceoem, destdriveroem2

                             

                            Case "OPTIPLEX GX260"

                            filesys.CopyFolder sourcedriverpath, destdriverpath

                            filesys.CopyFolder sourceoem, destdriveroem2

                             

                            Case "LATITUDE D620"

                            filesys.CopyFolder sourcedriverpath, destdriverpath

                            filesys.CopyFolder sourceoem, destdriveroem2

                             

                            End Select

                             

                            Set filesys = Nothing

                            • 11. Re: HII using WinPE - unable to get drivers to copy
                              Rookie

                              Thanks for the valuable info. - will try this method.

                              • 12. Re: HII using WinPE - unable to get drivers to copy
                                Jared Barneck SupportEmployee

                                jpweb63,

                                 

                                Can you make sure to put code in code tags.  When writing or posting a message, click to use Plain Text, and read teh "? Plain Text Markup Help" link.

                                 

                                Anyway, code tags look like this: 

                                my code here
                                some more code
                                

                                 

                                and it looks like this

                                 

                                my code here
                                some more code
                                

                                 

                                • 13. Re: HII using WinPE - unable to get drivers to copy
                                  Rookie

                                   

                                  We have many D530 machines and have found the following different descriptions for them

                                   

                                   

                                  Hewlett-Packard DSDT

                                  Hewlett-Packard HP d530

                                  Hewlett-Packard 0864h

                                  Compaq DSDT

                                  Compaq Computer Corporation DSDT

                                  Compaq Computer Corporation HP d530

                                  Compaq Computer Corporation 0864h

                                   

                                   

                                  You can use a query to identify the different model names used (system.model)

                                   

                                   

                                  • 14. Re: HII using WinPE - unable to get drivers to copy
                                    Rookie

                                    This is helpful - thanks. I'm finding there are many different model numbers for the same type of system. It's funny because when I tried going the VB script route the "getmachinetype.vbs" said the model value was"DSDT." Now I'm going the ldiscn32.exe route and it says the model is "085ch."

                                     

                                    I've resorted to using the inventory scanner / ldprep method to copy the drivers from the server to the hard drive. I don't understand scripting enough to comprehend 1/2 of the suggestions that people were kind enough to post to me - I have much to learn and just want to get HII working in this environment.

                                     

                                    jbweb63 - would you be able to show me the code you inserted into your .inf file? I can't get the correct syntax for copying the specific drivers using the "database macro substitution" feature described in the white paper. I'm trying to run the commands manually while booted into the WinPE environment and can't get the following line to work:

                                     

                                    cmd /c xcopy "I:\%Computer - System - Manufactuer%\%Computer - System - Model" c:\drivers /E /S /I

                                     

                                    Returns: File not found - %Computer - System - Manufacturer%

                                     

                                    Results of the ldiscn32 are attached.

                                    1 2 Previous Next