IT Management Suite

Expand all | Collapse all

Add New Nework Driver to existing Win7 Image

Migration User

Migration UserMay 07, 2010 09:35 AM

  • 1.  Add New Nework Driver to existing Win7 Image

    Posted Apr 19, 2010 05:14 PM
    I built my image in 6.9 using rdeploy. We just purchased some new hardware but Win7 does't already have the network drivers for the new hardware. Is it possible to add these new drivers without having to rebuild the image?


  • 2.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 20, 2010 12:48 AM

    Add those drivers to deploy anywhere driver database.
    DS console-> Tools->deploy anywhere driver database management

    and image deploy task select to use deploy anywhere to install drivers.


  • 3.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 20, 2010 01:21 AM
    I call rdeploy from a script. Is there a switch to tell it to use deploy anywhere?

    I thought deploy anywhere was only for ghost images?


  • 4.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 20, 2010 04:32 AM
    Try the following:

    1: Create A copy Files script under the automation (pref Linux) to the PROD disk to copy the drivers to a directory called Drivers


    # Drivers & Cmdlines.txt (Linux)
    echo Drivers > /dev/tty1
     
    /mnt/ds/RDeploy/Linux/firm -force -recurse copy /mnt/ds/Images/Drivers/Desktop/oem PROD:/Drivers > /dev/tty1
    (this copies the drivers from your DS from the dir Express\Images\Drivers\Desktop\OEM to C:\DRivers)
     
    2: Create A batch file with the following:

    @ Echo off
    cd c:\drivers
    echo Installing Drivers Please wait....
    for /f %%i in ('dir/b /s *.inf') do pnputil.exe -i -a %%i

    Copy this batch also with the linux boot.

    3: modify your answer file to run the batch file @ first boot.

    <RunSynchronousCommand wcm:action="add">
    <Description>Install Drivers</Description>
    <Order>2</Order>
    <Path>c:\drivers\installdrivers.bat</Path>
    </RunSynchronousCommand>
    </RunSynchronous>

    Please let me know if anny succes.


  • 5.  RE: Add New Nework Driver to existing Win7 Image
    Best Answer

    Posted Apr 20, 2010 06:30 AM
    You can use deploy anywhere to any image format.
    Drivers are applied after image is installed.

    add this to your script. EDIT all BOLDED text to suit your enviroment


    REM Install drivers using Deployanywhere
    del %SystemRoot%\inf\atrsdfw.inf"
    copy %ALTIRIS_SHARE%\Ghost\SMEUTIL.SYS %SystemRoot%\system32\drivers           
    %ALTIRIS_SHARE%
    CD %ALTIRIS_SHARE%\ghost\
    %ALTIRIS_SHARE%:\ghost\GhDplyAw32.exe /target=c:\windows /ddb=%ALTIRIS_SHARE%:\driversdb


    hope this helps you


  • 6.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 20, 2010 12:24 PM
    /target=c:\windows doesn't work. This windows 7 image has a system partition so I have been using D1P2:\ in my scripts to copy files. However, it seems this tool doesn't like it. Any ideas?


    Also, why are you deleting that inf file in the first line?


  • 7.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 20, 2010 12:38 PM

    Figured it out. Using /target=1.2:\Windows

    This helped
    http://service1.symantec.com/SUPPORT/on-technology.nsf/293a5302ae81e39288256ebb0049cfe7/2cf0e515ed142c3987257552005c615d?OpenDocument

    Got a missing driver warning, but I think this is going to work.



  • 8.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 21, 2010 12:50 AM
    yes its true that W7 may have that extra system partition.
    Then you just need to type /target=D:\windows

    That inf file must be deleted or deploy anywhere will not work. im not 100% sure why is that but that is done automatically if you use altiris buildin task to deploy image and check to use deploy anywhere to install drivers.





  • 9.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 21, 2010 11:17 AM
      |   view attached

    Getting closer but now I get this error when I try to run it and I have the correct drivers in the DB.

    Missing drivers detected:

    Device type  : Network Device
    PCI ID       : PCI\VEN_8086&DEV_10EF&SUBSYS_02DA1028&REV_05
    Description : Device Description UnavailableA cancel has been requested.

    When I run /eval it detects the missing driver:
    Missing driver detected :
     type =  NETWORK DEVICE
     PCI ID = PCI\VEN_8086&DEV_10EF&SUBSYS_02DA1028&REV_05
     Desc = @oem19.inf,%e10efnc.devicedesc%;Intel(R) 82578DM Gigabit Network Connection

    Any idea what is going on? I have attached the Debug.

    Attachment(s)

    txt
    ghDplyAw32_3.txt   403 KB 1 version


  • 10.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 22, 2010 12:47 AM

    Can you add driver you are using to zip file and attach it here?
    Sometimes inf files needs some modification to get it work corretly.

    What hardware (model) you are trying to install?


  • 11.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 22, 2010 12:01 PM
    I updated DS to SP4 last night and re-added the network drivers the DriverDB to make sure they import correctly. DA now finds the drivers and installs them without error. However, when the machine now runs through the unattend.xml it fails during "Setup is applying system settings" with the following error:

    "Windows could not parse or process the unattend answer file for pass [specialize]. The settings specified in the answer file cannot be applied. The error was detected while processing settings for component [Microsoft-Windows-Shell-Setup]."

    I looked at my unattend.xml and it looks fine and works fine if I don't use DA in the image process for other machines. The only thing I am doing in this stage of the unattend.xml is setting the computer name and license.

    - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <ComputerName>THOMAN-N-O980-A</ComputerName>
      <DoNotCleanTaskBar>false</DoNotCleanTaskBar>
      <ProductKey><key removed></ProductKey>
      <RegisteredOrganization>Company, Ltd</RegisteredOrganization>
      <RegisteredOwner>Company, Ltd</RegisteredOwner>
      <ShowWindowsLive>false</ShowWindowsLive>
      <TimeZone>Eastern Standard Time</TimeZone>
      </component>


  • 12.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 22, 2010 12:11 PM
      |   view attached

    Here are the steps of my DS job.

    1. Deploy Image
    2. copy tokenized unattend.xml to Windows\System32\sysprep
    3. Run DA

    I am trying to build a Dell Optiplex 980.

     

    I see this in the DA debug... where is it putting this? I think this is what is causing the problems now! Can I disable this or force it to use my unattend.xml file?

    * 2010-04-23T03:20:55.3026489Z Main Thread(1948) 
    SetUnattendedRestoreInfo() : Setting the following info
       Admin Password  *
       Organization    *
       Computer Name   WIN7MASTER
       CD Key          BBBBB-BBBBB-BBBBB-BBBBB-BBBBB
       UserName        DELETEME
       WorkGroup       workgroup
       Domain         
       TimeZoneName    @tzres.dll,-112
       TimeZoneID     
       AutoMode        PerSeat
       AutoUser        10
     

    Attachment(s)

    zip
    Intel.825XX.zip   355 KB 1 version


  • 13.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 22, 2010 05:10 PM
    DA is building an unattend.xml file in C:\Windows\Panther\ where I am putting mine in C:\Windows\System32\Sysprep\.

    Deleteing the one DA built almost fixed the issue. The NIC card is working but it isn't completely running through my unattend. I get the sysprep gui and nothing else runs. When I look at the state.ini file in C:\Windows\Setup\State it shows that it is set to ImageState=IMAGE_STATE_SPECIALIZE_RESEAL_TO_AUDIT.

    It looks like I wont be able to use the deploy anywhere since it is changing the unattend.xml and then running a sysprep again. I can modify my current unattend.xml to use the DriverPaths setting and copy down my drivers in another script. It should do the trick.


  • 14.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 22, 2010 09:15 PM
    Figured it out!!! It turns out DA was creating a bad unattend.xml file for my image. The CopyProfile tag only works if the only account in the image is the admin account. However, in my image I have .NET installed which adds an ASPNET user. It was also using a bad KEY. I ended up grabbing the following settings from what it was creating and adding it to mine and then deleting the one DA makes. I will to a full right up tomorrow.

     <settings pass="auditSystem">
      <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture= "amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <DriverPaths>
        <PathAndCredentials wcm:keyValue="1">
         <Path>C:\Drivers\Symantec\Retarget</Path>
        </PathAndCredentials>
       </DriverPaths>
      </component>
     </settings>
     <settings pass="auditUser">
     <component name="Microsoft-Windows-Deployment" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture= "amd64">
      <Reseal>
       <ForceShutdownNow>false</ForceShutdownNow>
       <Mode>OOBE</Mode>
      </Reseal>
     </component>
     </settings>
     <settings pass="oobeSystem">
      <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture= "amd64">
       <OOBE>
        <HideEULAPage>true</HideEULAPage>
        <SkipMachineOOBE>true</SkipMachineOOBE>
        <SkipUserOOBE>true</SkipUserOOBE>
       </OOBE>
      </component>
     </settings>


  • 15.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 27, 2010 02:18 PM
    Frankvh,

    Your little bat file there is amazing! I never knew about that pnputil.exe. This just made my post install process much simpler!

    Thanks!


  • 16.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 28, 2010 12:47 PM

    Pnputil.exe has solved the driver injection mystery.

    Thanks


  • 17.  RE: Add New Nework Driver to existing Win7 Image

    Posted Apr 30, 2010 04:38 PM
    That looks strangely familiar to the .bat file I wrote and presented at Vision 2010 and the Linux Script.....hmm. lol

    http://www.symantec.com/connect/videos/session-cm-b01-customer-take-windows-7-deployment-and-automation





  • 18.  RE: Add New Nework Driver to existing Win7 Image

    Posted May 04, 2010 09:36 AM

    :) yes allot of the code will always be the same :) not stealing though, never had my eyes on that post.

    But to be of some extra service, here i have a litle vbs that will install all your drivers in a C:\Drivers\%model%\LAN,C:\Drivers\%model%\VIDEO,C:\Drivers\%model%\etc etc

    be sure to make the script in linux (when using) to copy the files to D1P2, found out that the PROD uses the bitlocker/restore drive of 100 mb that 7 uses. or you can use the D partition when using WinPe.

    'script to install all drivers located directly under type
    ' uploaded by Frankvh aka Mindcre8r
    Dim ExePath

    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set WshShell = CreateObject("WScript.Shell")
    strComputer = "."
    ExePath = fso.GetParentFolderName(wscript.ScriptFullName)
    Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    'get list of models
    Set colModels = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='" & ExePath & "'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent")
    For Each objModel in colModels
                    'WScript.Echo objModel.Name
                    Set colModelHardware = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='" & objModel.Name & "'} Where AssocClass = Win32_Subdirectory ResultRole = PartComponent")
                    For Each objHardware in colModelHardware
                                    'WScript.Echo objHardware.Name
                                    Set colInfFiles = objWMIService.ExecQuery("Associators of {Win32_Directory.Name='" & objHardware.Name & "'} Where ResultClass = CIM_DataFile")
                                    For Each objInfFile in colInfFiles
                                                    If objInfFile.Extension = "inf" Then
                                                                    'Wscript.Echo objInfFile.Name
            If objInfFile.Name = ObjHardware.Name & "\autorun.inf" Then
             Exit For
            Else
                                                                     WshShell.Run "%comspec% /c pnputil.exe -i -a " & Chr(34) & objInfFile.Name & Chr(34)
             Wscript.sleep 5000
            end If
                                                    End If
                                    Next
                    Next
    Next

    So explaining all steps:

    1 Create your image
    2: Create a deployment job with the follwing
    a: delete the partitions with  a diskpart script (google or when required i can post) (WinPe)
    b: deploy image (Winpe 64 bit)
    c:  fix the boot order

    REM To fix boot order with BCDEDIT
    bcdedit /store c:\boot\BCD /set {bootmgr} device boot
    bcdedit /store c:\boot\BCD /set {default} device PARTITION=d:
    bcdedit /store c:\boot\BCD /set {default} osdevice PARTITION=d:

    d: Copy the drivers and the answerfiles to your machine (make sure to replace the file in the panther directory or setup wil use that one!!

    Your asnwerfile will no use the Synchrounous commands to install the drivers from the vbs (when specified ofcause :)


  • 19.  RE: Add New Nework Driver to existing Win7 Image

    Posted May 05, 2010 10:41 AM
    Obviously there a millon ways to skin a cat!  haha!

    The method we use....

    You can create hardware conditions based in your DS, because the DS gets a basic inventory of your hardware, which includes Serial Number and Model number.  (Which eliminates the need for a .vbs script)

    So create a condition in your DS for Model Number: XXXXX
    When that condition is met, just copy your drivers to C:\Drivers and use the PNPUTIL to insert those drivers into the Windows Driver Repository.

    Also, when you get a new piece of Hardware, just add a new condition.  You can also view your conditions to see all Hardware you have covered.

    If you are not using Bitlocker in your organization, you can also install Windows Vista/7 without actually using the "system reserved" partion, eliminating the need to boot to WINPE which takes a lot longer to boot into than Linux.

    In a nutshell:


    1. Create your image
    2. Create your conditions in the DS
    3. Deploy Image
    4. Using FIRM insert your drivers (Based on your DS Conditions)

    This takes away the need to boot into multiple pxe boots (Linux and WinPE or DOS)

    Either way works though!

    Thanks Frank for your insight though!


  • 20.  RE: Add New Nework Driver to existing Win7 Image

    Posted May 06, 2010 01:10 AM
    how do you go about the system reserved partition may i ask? i never seen an option to install without it!

    Thanks for the suggestion with the conditions for the machine makings.


  • 21.  RE: Add New Nework Driver to existing Win7 Image

    Posted May 06, 2010 09:50 AM
    In order:

    1.  Boot from Windows 7 CD
    2.  Select 'Install Now'
    3.  Accept License Terms
    4.  Select 'Custom Install'
    5.  Select 'Drive Options'
    6.  Delete All Partitions
    7.  Select 'New'
    8.  Enter Drive Size (Use all of Hard drive)
    9.  Select 'Apply'
    10.  Select 'OK' about additional Partitions
    11.  Delete Larger Partition (NOT SYSTEM RESERVED)
    12.  Select the 'System Reserved Partition' - Should be smaller of the 2 shown
    13.  Select 'Extend'
    14.  Enter full amount of Hard Drive space (Use all MB Available)
    15.  System Reserved Partition is now full size of Hard Drive
    16.  Select 'Next'
    17.  Continue with normal Windows 7 Install.

    Hope that helps!

    Let me know how that goes for you!

    Justin


  • 22.  RE: Add New Nework Driver to existing Win7 Image

    Posted May 07, 2010 09:35 AM
    WoW thats amazing! Thanks!


  • 23.  RE: Add New Nework Driver to existing Win7 Image

    Posted May 13, 2010 10:12 AM
    Hi guys

    Very interresting thread.   It's exactly what I was searching for.

    I tried to use the batch file with pnputil and I also tried to use the vbs script tp inject my drivers but no luck so far.    Does somebody have an example of a unattend.xml file containing the custom command to run the script at first boot?

    I think my problem is with the answer file because when I add the command to run the script to it my proces fail.    The machine is downloaded and when it reboot I have an error message saying that my unattend.xml file under C:\Windows\Panther is invalid.   If I remove the command about the batch file from my unattend.xml file, the process is working correctly and my custom unattend.xml is processed (not the one in C:\Windows\Panther)

    Any help with that would be appreciated

    Thanks