CA Client Automation

  • 1.  OSIM Driver Management

    Posted Mar 17, 2014 04:04 PM

    Does anyone have a solution for only installing drivers per model?  Installing ALL drivers in the WIM or even after deployment using the pnputil command does not seem like a scalable solution for a company with many models.  I am looking for something that would only inject drivers specific to the model being imaged like MDT/SCCM is able to do.



  • 2.  RE: OSIM Driver Management
    Best Answer

    Posted Mar 19, 2014 09:41 AM

    Hi,

    we currently use wmi to detect the model then copy the drivers needed from a share on the scalability server and then install the drivers during the windows 7 installation with dpinst. There was a CA podcast a while ago which mentioned this method unfortunately I was not able to find it anymore.

    I will try to explain the things which have to be done:

    • Create a share (we use OSIM_DRIVERS as you will see later in the command lines) on the scalability server and give the local user canonprv read access to this share and on the directory (ntfs permissions).
    • Create a folder for each device in this share. The folder name should be the device name as shown via "wmic csproduct get name"
      without empty spaces (ex. Dell Latitude 999 X would be DellLatitude999X). 
    • Copy the required driver files into this directory. You can also create subdirectories for each device (ex. LAN, Audio, etc.).
    • Create a directory ALL and copy the dpinst tool into it (please use the 32bit or 64bit version dependent on your client OS). You have to configure the dpinst.xml file to install drivers quietly. It may look like this:
    <?xml version="1.0"?> 
    <dpInst>
    <deleteBinaries/>
        <quietInstallStrict /> 
        <suppressAddRemovePrograms/>
        <legacyMode /> 
        <suppressWizard />
    <search>
        <subDirectory>*</subDirectory>
    </search>
    </dpInst>
    • Modify the file CA\DSM\Server\SDBS\var\managedpc\camenu\<imagename>.cmd and add the following lines between "set TEMPDISK=c:" and "c:
      cd \
      c:\ca-osim\sdmpcimg -m TFTP -t #MPCPATH#/camenu/<imagename>.inf c:\ca-osim\unattend.xml":
    REM -- Determine hardware model to copy proper drivers
    
    net use t: /d  > NUL
    c:\ca-osim\canet use t: \\$BootServer$\OSIM_DRIVERS $LogonPasswd$ /USER:$BootServer$\canonprv 
    SET OSIMMODEL=UNKNOWN
    
    wmic csproduct get name | find /V "Name">temp.txt
    set /p OSIMMODEL=<temp.txt
    del temp.txt
    set OSIMMODEL=%OSIMMODEL: =%
    
    xcopy T:\%OSIMMODEL%\*.* C:\oeminst\driver\ /SEDCY
    xcopy T:\ALL\*.* C:\oeminst\driver\ /SEDCY
    net use t: /d  > NUL
    
    REM -- END
    • Modify the file CA\DSM\Server\SDBS\var\managedpc\images\<imagename>\<imagename>\oeminst\custom.cmd and add before "rem -- check whether second run is required":
    
    
    cd \oeminst\driver
    dpinst64.exe /S /Q

     

    This should copy only the device specific drivers to the C:\oeminst\driver directory on the pc. In Windows dpinst will go through all the directories and install the drivers.

    If you have further questions I will try to help you.

    Regards,

    Alex



  • 3.  RE: [Client Management Solutions General Discussion] RE: OSIM Driver Manage

    Posted Mar 19, 2014 10:29 AM
    I don’t know if you want to try, but with some serious modifications in winpe, I integrated Microsoft MDT with CA OSIM…



    I am trying to find a better way of doing it. It gave me the ability to create images outside of CA, update and etc on the fly.



    I also used a technology called Dell XImage, which this process worked very well with CA OSIM. It used Cab files as driver packs and etc. Pretty clever stuff.



    I reimaged 45000+ machines using it, 127 + models, all through OSIM.





    From: CA Client Management Solutions Global User CommunityMessage Boards [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Wednesday, March 19, 2014 9:45 AM
    To: mb_message.2311054.111386082@myca-email.ca.com
    Subject: [Client Management Solutions General Discussion] RE: OSIM Driver Management



    Hi,

    we currently use wmi to detect the model then copy the drivers needed from a share on the scalability server and then install the drivers during the windows 7 installation with dpinst. There was a CA podcast a while ago which mentioned this method unfortunately I was not able to find it anymore.

    I will try to explain the things which have to be done:

    *
    Create a share (we use OSIM_DRIVERS as you will see later in the command lines) on the scalability server and give the local user canonprv read access to this share and on the directory (ntfs permissions).
    *
    Create a folder for each device in this share. The folder name should be the device name as shown via "wmic csproduct get name"
    without empty spaces (ex. Dell Latitude 999 X would be DellLatitude999X).
    *
    Copy the required driver files into this directory. You can also create subdirectories for each device (ex. LAN, Audio, etc.).
    *
    Create a directory ALL and copy the dpinst tool into it (please use the 32bit or 64bit version dependent on your client OS). You have to configure the dpinst.xml file to install drivers quietly. It may look like this:


    <?xml version="1.0"?>
    <dpInst>
    <deleteBinaries/>
    <quietInstallStrict />
    <suppressAddRemovePrograms/>
    <legacyMode />
    <suppressWizard />
    <search>
    <subDirectory>*</subDirectory>
    </search>
    </dpInst>

    *
    Modify the file CA\DSM\Server\SDBS\var\managedpc\camenu\<imagename>.cmd and add the following lines between "set TEMPDISK=c:" and "c:

    cd \

    c:\ca-osim\sdmpcimg -m TFTP -t #MPCPATH#/camenu/<imagename>.inf c:\ca-osim\unattend.xml":


    REM -- Determine hardware model to copy proper drivers

    net use t: /d > NUL
    c:\ca-osim\canet use t: \\$BootServer$\OSIM_DRIVERS <file:///\\$BootServer$\OSIM_DRIVERS> $LogonPasswd$ /USER:$BootServer$\canonprv
    SET OSIMMODEL=UNKNOWN

    wmic csproduct get name | find /V "Name">temp.txt
    set /p OSIMMODEL=<temp.txt
    del temp.txt
    set OSIMMODEL=%OSIMMODEL: =%

    xcopy T:\%OSIMMODEL%\*.* C:\oeminst\driver\ /SEDCY
    xcopy T:\ALL\*.* C:\oeminst\driver\ /SEDCY
    net use t: /d > NUL

    REM -- END

    *
    Modify the file CA\DSM\Server\SDBS\var\managedpc\images\<imagename>\<imagename>\oeminst\custom.cmd and add before "rem -- check whether second run is required":



    cd \oeminst\driver

    dpinst64.exe /S /Q



    This should copy only the device specific drivers to the C:\oeminst\driver directory on the pc. In Windows dpinst will go through all the directories and install the drivers.

    If you have further questions I will try to help you.

    Regards,

    Alex

    Posted by:AMaack
    --
    CA Communities Message Boards
    111388622
    mb_message.2311054.111386082@myca-email.ca.com <mailto:mb_message.2311054.111386082@myca-email.ca.com>
    https://communities.ca.com


    --

    ------------------------------
    The information contained in this e-mail and any attached documents may be
    privileged, confidential and protected from disclosure. If you are not the
    intended recipient you may not read, copy, distribute or use this
    information. If you have received this communication in error, please
    notify the sender immediately by replying to this message and then delete
    it from your system.
    ----------------------------


  • 4.  RE: [Client Management Solutions General Discussion] RE: OSIM Driver Manage

    Posted Mar 24, 2014 02:04 PM

    Cholmes2.2,

    How far did you integrate with MDT?  Is it deploying from an MDT deployment share?



  • 5.  Re: [Client Management Solutions General Discussion] RE: [Client Management

    Posted Mar 24, 2014 02:25 PM
    It is, I used the preplace.exe command to take portions out of the
    canpc.dat, and I setup the shares, then did a copy to each boot server. If
    you answer all the questions, litetouch can be a 0 touch implementation.

    The biggest problem I had was using canet to map tht edrive back, so I just
    added this to the task squence inside of MDT to map the share. Then I
    created an image upload job that used the computer account and robocopy to
    look at the master MDT server and copy down changes.

    Most of the stuff I did was inside of winpe, threwout the need for the
    batch file and used 100% of the MDT portion.

    I also have a method for reimaging a computer now, without the need for
    OSIM, just using a script and calling the MDT script. It worked out well in
    a pilot test, would love to see something liek this from CA. OSIM needs an
    overhaul, badly. Need more features.

    The only other thing I did was created an offline job to deploy software
    during the imaging process so software was ready when the user had the
    image finished. This can be a bit of a pain in the butt, because the
    Software delivery agent does not want to do an offline job if it sees it is
    online, so I had to trick this back in 12.5 SP1. I have not tried an
    offline job in 12.8 but I doubt it is any better.




    On Mon, Mar 24, 2014 at 2:04 PM, CA Client Management Solutions Global User
    CommunityMessage Boards <CommunityAdmin@communities-mail.ca.com> wrote:
    Cholmes2.2,

    How far did you integrate with MDT? Is it deploying from an MDT
    deployment share?
    Posted by:afbeaver01
    --
    CA Communities Message Boards

    111686112
    mb_message.2311054.111683572@myca-email.ca.com
    https://communities.ca.com
    --

    ------------------------------
    The information contained in this e-mail and any attached documents may be
    privileged, confidential and protected from disclosure. If you are not the
    intended recipient you may not read, copy, distribute or use this
    information. If you have received this communication in error, please
    notify the sender immediately by replying to this message and then delete
    it from your system.
    ----------------------------


  • 6.  RE: OSIM Driver Management

    Posted Mar 24, 2014 02:00 PM

    Thanks for the good info!

    What I have working in testing so far is a process similar to this.  I have a driver share setup like you described.  The main difference is I am injecting the drivers offline using DISM.exe right after applying the wim to the target machine.  This is done in <imagename>.cmd after getting the model using wmic.  Something like this:

    DISM.exe /image:C: /Add-Driver /Driver:Z:\OSIMDrivers\%OSIMModel%\%OSIMOSVER%\%OSIMARC% /recurse /forceunsigned



  • 7.  RE: OSIM Driver Management

    Posted Apr 01, 2014 08:24 PM

    The 6/2011 CA IT Client Management Solutions Global User Community Webcast  was about customizing OSIM and this was a topic.

    If you PM me I can send you the very technical docs on a method to do this.  Quick sumary.

     

    Overview:

    We are primarily using WinPE x86 & WinPE x64 3.0 boot images with Windows7 & Windows7x64 OS image types.  The WinPE .wim images have been modified so the OS setup batch files detect the hardware details via WMI and copy only the relevant drivers for that particular hardware type along with additional software specific to manufacturer or machine type.  I also use  WAIK and ImageX tools to append images to the OS .wim files to save space and keep multiple image types in few .wim files.

    1. Creating a generic Drivers share as an image:   The Win7x86 & Win7x64 images map a drive to the driver share when running camenu\<imagename>.cmd.   I registered a WinXP image with IPS, cleared out the contents of the directory, and built the driver repository with structure of   <model>\<OS>\<OS architecture> (E4310\win7\x64 & E4310\win7\x86).    The Drivers image is registered in the SD Library (so can stage to SS), but image isn’t registered with IPS. 

    The reason I registered the driver repository as an image was:

    • Creates the necessary security to map a drive via  camenu\<imagename>.cmd
    • Works well to stage Drivers to SS
    • One central location to manage drivers as opposed to keeping drivers with OS images

     

    1. Modifying the WinPE 3.0 .wim files to include WMIC support:   In order to run the WMIC commands to detect hardware additional components were required in the boot images.  Two  PETools packages were added to boot images (winpe-scripting.cab & winpe-wmi.cab).  I did the WinPE modifications outside of ITCM using IMAGEX & DISM commands from a WAIK workstation to mount and modify the images.   Sample of the steps for WinPE 3.0
    1. imagex /mountrw <boot-image-path>\winpe.wim 1 c:\mount-temp
    2. dism /image:c:\mount-temp /Get-Packages
    3. dism /image:c:\mount-temp /Add-Package /PackagePath: "C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-scripting.cab”
    1. Dism /image:c:\mount-temp /Add-Package /PackagePath: "C:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\winpe-wmi.cab”
    1. imagex.exe /unmount /commit c:\mount-temp

    A pitfall with my WinPE .wim modifications is if I were to use the IPS update boot image wizard to add drivers to the WinPE images the IPS wizard would undo the WMI changes that I’ve made.  If I need to inject drivers into the WinPE images I’ll  do it manually from a WAIK workstation with DISM /Add-Driver command.  

     

    1. Modifying driver search path:  In some instances I found that drivers wouldn’t be used from c:\oeminst\driver directory.  I used the WAIK tools to mount image’s .wim file, open the HKLM\Software registry hive on the image and append c:\oeminst\driver to HKLM/Software/Microsoft/Windows/Current Version DevicePath value.

    http://technet.microsoft.com/en-us/library/cc753716.aspx

     

    1. Modifying   camenu\<imagename>.cmd to detect model & copy drivers:  I’ve made modifications to the  <imagename>.cmd batch files to run a WMIC command to determine hardware type, then set variables based on that output.    The V: drive is mapped to the driver repository and appropriate drivers/files are copied to standard c:\oeminst\driver directory  on imaging asset.  My company also has a requirement that portable assets must have full disk encryption, so I’m also using the WMIC data to determine if asset is laptop or desktop.  Laptops have disk encryption & VPN software copied locally.  Additionally if asset is a Dell then DCSU is being copied.  I’ll detail DCSU farther down the email.  Later using CUSTOM.CMD after OS installed to install disk encryption, VPN, and DCSU software if files exists.   Attached OSSETUP.TXT shows a condensed version of the modifications to <imagename>.cmd
    2. Modifying   <OS-Image>\oeminst\custom.cmd to install make/model specific software:   As mentioned in #4 our laptops and desktops have different software requirements.  In this file I am testing for existence of any files that would have been copied locally by <imagename>.cmd and launching automated installs for those products.   This file is bit complex with the reboot options, so I’m careful where I place items and tracking the changes.  Below is example of Dell’s getting DCSU installed.
    3. Setting up drivers:   My company is primarily a Dell partner for desktop & laptops.   Dell provides Driver Packs for most business class hardware on their support site under drivers>systems management.  Driver packs contain all the drivers for a system model with the standard Dell configuration options.  Example if Dell offers an Nvidia or ATI video card as standard options for Optiplex 790 the driver pack will contain both those video card drivers along with the other driver options.   A pitfall with the Dell driver packs is Dell often leaves unsigned drivers in the packs, unsigned drivers will cause the Win7 setup.exe to fail.  It’s fairly easy to troubleshoot the unsigned driver(s) and remove.   This Microsoft KB details driver issue further.  http://support.microsoft.com/kb/2012889
    4.     DCSU to update drivers & BIOS:   Dell provides a utility for majority of their business class lines called Dell Client System Update.   This utility is simple to install and provides a CLI to automate drivers/BIOS updates.   It’s configurable via an .XML file which can also be used  for controlled driver update repositories.  Dell documented the product well and has a good whitepaper on setting up DCSU to work with a driver repository.    Earlier version has some stability issues with CLI, but latest version 1.3 notes the issue and appears more stable.

    http://en.community.dell.com/techcenter/systems-management/w/wiki/1960.dell-client-system-update.aspx

    http://media.community.dell.com/en/dtc/attach/customizing%20update%20deployment%20using%20dcsu%20and%20rm%20software%20integration.pdf