Home » Drive Download automation » Getting Win10 drivers to enterprise systems

Upgrading windows 7 or 8 OS to windows 10, upgrade process certainly does a good job along with the retention of current data and applications. When it comes to drivers, those were working fine with earlier OS, surprises keep coming up unless a separate process ensures drivers are also upgraded to windows 10 specific version. Windows update can help doing that. However, in case of enterprise environment with system configured towards SCCM SUP as the windows update point, things go out of luck as newer version SCCM servers no longer holds driver update catalogues. This brings the need to address driver related issues like abrupt systems shutdown, BOE etc. as part of windows 10 migration.

Asking users to visit vendor support portal and fetch the required drivers, certainly an option I would not suggest. Instead making them available in an intranet portal with way to download them effortlessly would sure would help. I succeeded doing the same for Lenovo and HP system. In case of Lenovo, the ThinkVantage Update Retriever tool would allow downloading drivers for predefined system model collections. Here is the field to define the models in toll

Instead of entering them manually one by one, a text file saved with the extension “.ur” in the format of <first four character of machine type>#<operating system>#<Model Description for reference> can be used to import all the required models

Sample .ur file content

2325#Windows 10#Thinkpad X230
20DS#Windows 10#TP-L450
20AS#Windows 10#TP-L440
20AM#Windows 10#TP-X240
2466#Windows 10#TP-L430
10CT#Windows 10#TC-M79
10JA#Windows 10#TC-M79

Post import of the file above

Once defined, update retriever tool would download the update repository list and then the updated into defined Repository location as bellow.

Downloading all of them to a single folder saves space as many of them would be applicable to multiple system. However, to share with user it creates a problem as that need to be presented in model specific folder structure. That way user can visit to their model specific folder and download the updates. It does provide export option but that with each updates expanded to their individual files contains, something that can be used for INF file injection requirement but not for downloading over a web browser. Fortunately for the updates it retrieves, it creates a master database XML file at the root of the repository folder. Each update has their own detailed XML file and is linked to the master database XML.

Through a PowerShell script, these XML files can be processed and updates can be copied to their respective model specific folder. In addition, download all text and download all PowerShell script can be prepared as part of this process. One idea could be to link them from the repository folder instead of creating duplicates, to save disk space. Instead, Dedup enabled on D drive takes care of the disk space saving and making it simple this way and also helps visualizing the updates by model name. In my case here, all the model specific folders are created under D:\Driver\Lenovo and same is exposed through IIS with directory browsing enabled for user and installation engineers to download them, either individually or all of them using the PowerShell script in the folder.

$LenovoDownloaddir = "D:\DriverDump\Lenovo"
$LenovoIISrootdir = "D:\Driver\Lenovo"
$Lenovowebroot = "http://win10driver.pkpnotes.com/Lenovo/"
$LenovodatabaseXML = Join-Path $LenovoDownloaddir database.xml

"ThinkPad X230","ThinkPad X240","ThinkPad L430","ThinkPad L440","ThinkPad L450","ThinkCenter M79"|%{
$driverdestinationfolder = Join-Path $LenovoIISrootdir $_
if (Test-Path $driverdestinationfolder) { Remove-Item $driverdestinationfolder -Recurse -Force }
mkdir $driverdestinationfolder
$downloadalltxtfile = Join-Path $driverdestinationfolder downloadall.txt
Add-Content $downloadalltxtfile "Open powershell (Start ==> Run ==> PowerShell), change to directory where you want to download all files and copy and paste the bellow lines"
Add-Content $downloadalltxtfile "Alternatively download the downloadapp.ps1 script and run with PowerShell"
Add-Content $downloadalltxtfile ""
Add-Content $downloadalltxtfile ""


Select-Xml -XPath "/Database/Package" -Path $LenovodatabaseXML | %{

$driverdescription = $_.Node.description
$driverSeverity = $_.Node.Severity
$driverformodels = $_.Node.SystemCompatibility.system.mtm
$driverxmlfiletouse = Join-Path $LenovoDownloaddir $_.Node.LocalPath
[xml]$driverxml = Get-Content $driverxmlfiletouse
$driverVersion = $driverxml.Package.version
$driverarch = $driverxml.Package.Dependencies.and._CPUAddressWidth.AddressWidth

if ( $driverarch -ne 32 ) {
$driverReleaseDate = $driverxml.Package.ReleaseDate
$driverfilename = $driverxml.Package.Files.Installer.File.Name
$driverbasedir = (Get-Item $driverxmlfiletouse).DirectoryName
$driversourcefile = Join-Path $driverbasedir $driverfilename
#$destination_fileName = $Softpackfile.Category+"_"+$Softpackfile.Purpose+"_SP"+$Softpackfile.Id+"_"+$Softpackfile.Name+"_"+ $Softpackfile.Version + "_" + $Softpackfile.DateReleased +".exe"
$destination_fileName = $driverSeverity+"_"+$driverdescription+"_"+ $driverVersion.Version + "_" + $driverReleaseDate+".exe"
$destination_fileName = $destination_fileName.Replace("\","_")
$destination_fileName = $destination_fileName.Replace("/","_")
$destination_fileName = $destination_fileName.Replace(","," ")
$destination_fileName = $destination_fileName.Replace("`n"," ")

    foreach ( $driverformodel in $driverformodels ) {
        switch ($driverformodel) {
            2325 {$destiantionBaseFolder = Join-Path $LenovoIISrootdir "ThinkPad X230"}
            20DS {$destiantionBaseFolder = Join-Path $LenovoIISrootdir "ThinkPad L450"}
            20AS {$destiantionBaseFolder = Join-Path $LenovoIISrootdir "ThinkPad L440"}
            20AM {$destiantionBaseFolder = Join-Path $LenovoIISrootdir "ThinkPad X240"}
            2466 {$destiantionBaseFolder = Join-Path $LenovoIISrootdir "ThinkPad L430"}
            10CT {$destiantionBaseFolder = Join-Path $LenovoIISrootdir "ThinkCenter M79"}
            10JA {$destiantionBaseFolder = Join-Path $LenovoIISrootdir "ThinkCenter M79"}
            default { $destiantionBaseFolder = ""}
            if ($destiantionBaseFolder) {
              $destination_file = Join-Path  $destiantionBaseFolder $destination_fileName
              copy -Path $driversourcefile -Destination $destination_file
              $modelwebbase = $destiantionBaseFolder.Replace($LenovoIISrootdir+"\",$Lenovowebroot)
              $driverdownloadurl = $modelwebbase + "/" + $destination_fileName
              $downloadalltxtfile = Join-Path $destiantionBaseFolder downloadall.txt
              $downloadallpsfile = Join-Path $destiantionBaseFolder downloadall.ps1
              Add-Content $downloadalltxtfile "Start-BitsTransfer -Source ""$driverdownloadurl"""
              Add-Content $downloadallpsfile "Start-BitsTransfer -Source ""$driverdownloadurl"""




Leave a Reply

Your email address will not be published. Required fields are marked *