Deployment and Imaging Group

 View Only
  • 1.  Injecting Drivers into Windows XP Install: DS 7.1

    Posted Oct 03, 2011 08:20 AM

    We have recently started using DS 7.1 for imaing new machines with Windows 7, which is working fine, driver injection at present is a script which just copied all drivers we know are missing for the different motherboards / laptops that we have using W7 in to a C:\drivers folder, which is then picked up during the mini-setup phase.

    For Windows XP we have hit a brick wall though, as we cannot use the token replacement which we used on 6.9, does anyone have a sure fire way to replicate the below script which we used to run after putting the image on the machine? (Taken the majority of script out just to show how it works for one laptop)

     

    REM WinPE Copying Required Drivers
    @echo off
    .\Rdeploy\windows\firm.exe delete prod:aclient.cfg

    echo Model Number is %#!computer@model_num% and Product Name is %#!computer@prod_name%

    if "%#!computer@prod_name%"=="satellite pro a100" goto A120

    goto Exit

    :A120
    echo Satellite Pro A120
    .\Rdeploy\windows\firm.exe -recurse copy .\models\A120 prod:\
    goto Exit

    Is DeployAnywhere good enough to do this job, which would mean uploading drivers for about 15-20 different models of PC and laptop to the database, or shall we try something different? Putting all the drivers on to the image isn't an option as there are far too many and it would bloat the image.

    We want to start using 7.1 for all imaging but this problem means that currently we need to use 6.9 still for XP imaging.



  • 2.  RE: Injecting Drivers into Windows XP Install: DS 7.1

    Posted Oct 05, 2011 01:18 PM

    You could use DeployAnywhere for critical and non-critical drivers.  Alternatively, you could use a WMI query to select the model name, then include the variable in the path to your driver share.  For this to work in your above example, the below script should return 'A120' as strName.  If it returns 'Satellite Pro A120', then name your folder 'Satellite Pro A120,' because it's going to use this exact value to find the path, since we don't have conditions.  Whether you use FIRM here or xcopy or something else, it should work just the same -- copy just the drivers for this model to the local drive.  Then, as you mentioned, you'll reference this from your mini setup.

    'On Error Resume Next
    dim strName, strComputer, objWMIService, colItems, fso, objShell, objFolder, colSubfolders

    strComputer = "."

    Set fso = CreateObject ("Scripting.FileSystemObject")
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)
    ' Get model number of system board from the Win32_ComputerSystemProduct Name via WMI
    For Each objItem in colItems
      strName = objItem.Name
      Wscript.Echo strName
    Next



  • 3.  RE: Injecting Drivers into Windows XP Install: DS 7.1

    Posted Oct 06, 2011 05:29 AM

    This is a simple script to detect a PC or Laptop's model through WMI in a vbs file, then pass this back to the command prompt and delete the temporary VBS file, the second part of the script then checks the model name, and copies the required drivers to C:\drivers, for this to work you need to have pointed your sysprep file to C:\drivers, you also need a map drive script to run before this in order to map a drive to the deployment server, in order to run firm.exe, and another drive if required to your driver share (mapped as k: and j: in this example).

    This is for Windows XP but the same applies for Windows 7.

    REM WinPE Copying Required Drivers
    REM Windows XP 32bit Systems
    @echo off

    setlocal
    set tmpfile=K:\%random%.vbs
    echo Set CSset = GetObject("winmgmts:")._ >%tmpfile%
    echo InstancesOf("Win32_ComputerSystem") >>%tmpfile%
    echo For Each CS In CSset >>%tmpfile%
    echo WScript.Echo CS.Model >>%tmpfile%
    echo Next >>%tmpfile%

    for /f "tokens=*" %%a in (
    'cscript.exe //Nologo %tmpfile%') do set model=%%a

    del %tmpfile%

    echo Model Number is %model%

    if "%model%"=="satellite pro a120" goto A120

    :A120
    echo Satellite Pro A120
    "J:\Task Handler\rdeploy\firm.exe" -recurse copy K:\WindowsXP\A120 prod:\
    goto Exit

    ::HAL
    echo HALS required
    "J:\Task Handler\rdeploy\firm.exe" -recurse copy K:\WindowsXP\HALS\acpi prod:\Windows\System32
    goto Exit

    :Exit

    I hope this helps you out if you were stuck on driver injection as we were, it's a far quicker solution than DA at this point in time and allows you to include all drivers.



  • 4.  RE: Injecting Drivers into Windows XP Install: DS 7.1
    Best Answer

    Posted Oct 10, 2011 10:44 AM

    REM WinPE Copying Required Drivers
    REM Windows XP Systems
    @echo off

    FOR /F "tokens=2 delims==" %%G IN ('WMIC computersystem get model /format:VALUE') DO SET Model=%%G

    ECHO Model: %Model%

    "J:\Task Handler\rdeploy\firm.exe" -recurse copy chr(34)K:\WindowsXP\%Model%chr(34) prod:\

    goto Exit

    :Exit