Driver Packages for Lenovo and HP

I’ve had several requests to extend my Dell Driver Pack Catalog Tool to Lenovo and HP.

I got as far as developing a powershell script to get a Lenovo driver manifest by web-scraping the support.lenovo.com web site:


#requires -version 3
#Requires -RunAsAdministrator

[CmdletBinding()]
param()

Write-verbose “Download Model List”
$AllModels = Invoke-WebRequest http://support.lenovo.com/en/documents/ht074984
$ModelPages = $AllModels.links.href |
   select-string -allmatches “(?:/docs/|/us/en/downloads/)(ds[0-9]+)” |
   ForEach-Object { $_.matches.groups[1].value } |
   Select-Object -Unique

Write-Debug “Done: Count[$($ModelPages.count)]”

$i = 0
$manifWrite-Verbose “Download each model page”
ForEach ( $Model in $ModelPages ) {
Write-Progress -Activity “Download $Model -PercentComplete ($i * 100 / $ModelPages.Count)
    $i++
    Invoke-WebRequest http://support.lenovo.com/us/en/downloads/$Model |
        ForEach-Object {
            [PSCustomObject] @{
                 PackageID = $Model;
                 Title = $_.ParsedHTML.Title;
                 Download = ($_.links.href -match “.*exe”)
            }
        }
}

Write-Progress -Activity “Done” -Completed


The next step is to download and extract the *.exe package (with the /silent or /VerySilent switch), and then import into MDT Litetouch or SCCM

Unfortunately, I’m not very happy about the way the Model numbers are displayed/parsed by the web site and my script, and I would prefer something that is machine readable (XML file, for example). This would allow us to follow the Johan “Total Control” method of driver management.

If you know how to get the Model Numbers for Lenovo machines given the packages from the web site, let me know.

http://support.lenovo.com/en/documents/ht074984

ftp.hp.com/pub/caps-softpaq/cmit/HP_Driverpack_Matrix_x64.html
ftp://ftp.hp.com/pub/caps-softpaq/cmit/HP_Driverpack_Matrix_x86.html

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s