Silent Running Option

A common request over the past while was to create an option to run the Driver Automation Tool in the background as a scheduled task. So in this release I have added in the functionality, allowing you to schedule the job directly within the tool.

When you run the Driver Automation Tool in full GUI mode you will notice that there is a new tab labelled “Scheduling Options”. In this tab you select the time for the job to run, the location where you wish to run the script from and credentials for the service account.

The credentials will be tested against active directory to ensure that they are correct, you should however ensure that the account has sufficient rights to your ConfigMgr environment and Run As A Service rights.

How Does It Work?

Contained within the directory specified for the scheduled task, the GUI will automatically copy across the newly created Run-DriverAutomationToolSvc.ps1 script. This script is a scaled down version of the GUI script containing all of the core features and designed for silent running in conjunction with the exported XML settings from running the GUI to perform the initial selections.

Upon initial launch of the GUI to make the required selections, an XML settings file will be generated and maintained both for the GUI and silent running option. Upon each subsequent GUI launch, the file will be replaced however it will read in the previous settings to ensure that you do not have to start from scratch.

If you wish to run the GUI tool for a once off download without updating the XML file you can call the PS1 directly and use the “-NoXMLOutput True” switch

XML Example

Script In Action
Logging

Upon the first run of the scheduled task, sub-folders will be created for the temporary files and the log file. The logging provides the same output as running the full GUI tool, example:

Other Improvements

Microsoft Surface Drivers

It was reported to me that in some instances the UNC path for the extracted drivers was going beyond the 255 character limit due to the folder names generated by the MSI. To get around this the drivers are now extracted locally and only the Drivers and Firmware folders (and their sub-folders) are moved to the UNC path specified, thus greatly reducing the path length and should resolve any import or packing issues.

Improved Validation

Validation has been included to help ensure you pick all the required options before starting the download process and to ensure that the XML generated does not contain null entries.

MDT WMI Manufacturer Naming

For those of you using the total control method with MDT, I have included a switch in the code which will automatically replace the friendly manufacturer name with the full WMI name.

User Guide

A user guide is now included to cover the basic operations to get the script up and running.

Download The Script

You can download the script from the Microsoft Technet Script Repository – https://gallery.technet.microsoft.com/Driver-Tool-Automate-9ddcc010

(2885)

Maurice Daly

Maurice has been working in the IT industry since 1999 and was awarded his first MVP Enterprise Mobility award in 2017. Technology focus includes Active Directory, Group Policy, Hyper-V, Windows Deployment (SCCM & MDT) and Office 365.

comments
  • Morten
    Posted at 14:05 August 9, 2017
    Morten
    Reply
    Author

    So its more a “heads-up” for others.

    I just used the new driver tool to fill out some missing models.
    It searched my sccm and found all my models (a very nice feature!) and i figured i might as well check all if newer drivers was avail.

    What i did see was that some packages was being re-created even though they were same version number.
    All my driver packages was recently created with version 0.9 of your driver script – with the new Lenovo goodies.
    See snip of my log.

    It did it because i had removed a driver from the package – Nvidia driver – but not the source.
    My T460s does not have Nvidia card and the package comes with Nvidia and Intel drivers – causing my DISM to fail.

    Make sure you remove the driver both places then it will just see it as “already exists”.

  • Joe
    Posted at 14:52 August 10, 2017
    Joe
    Reply
    Author

    Error: Errors Occurred While Creating Package 1/1/1601 12:00:00 AM 0 (0x0000)

    Is there any way to get more information as to what happened here?
    Thanks

  • Thomas
    Posted at 14:51 August 30, 2017
    Thomas
    Reply
    Author

    Is there still issues with Dell and Driver/BIOS packages, as i cant seem to get it to work anymore after it broke the other day..

    • Maurice Daly
      Posted at 21:42 August 31, 2017
      Maurice Daly
      Reply
      Author

      Hi Thomas

      Can you give examples?. Have you tested the URL’s retrieved from the XML contained within the log as there have been issues with bad links in the Dell XML of late.

      Maurice

      • Thomas
        Posted at 07:17 September 1, 2017
        Thomas
        Reply
        Author

        I have Version 4.1.1, and whenever i start the Tools, i get Reading driver Pack XML File d:\blablabla\Temp\DriverPackCatalog.xml file, and 0 Known Dell Models found.

        the DriverPackCatalog.cab file has not been updated since August 9th.
        The DriverPackCatalog.xml file is missing.

        If i try and find models from manufactor flip from Dell, it comes back empty..

        If i try to download New drivers, the system says its already there, as it probably hasnt been able to check for New Versions of the model..

        At a futile attempt i deleted the DriverPackCatalog.cab file as a last effort and it seems that made the trick, it created a New file and it Works better now.

        • Maurice Daly
          Posted at 10:31 September 1, 2017
          Maurice Daly
          Reply
          Author

          Hi Thomas,

          It looks like just an issue with the cab then. I was previously deleting this on each subsequent run, however I am sure Dell wouldn’t appreciate the potential of thousands of computers downloading the cab each time the tool was run so I changed it to remove the XML if it was older than 7 days, overlooking the cab in this instance. I will update the code to remove the cab; you can add this in by changing this section:

          Get-ChildItem -Path $global:TempDirectory -Recurse -Filter *.xml -File | Where-Object { $_.CreationTime -lt (Get-Date).AddDays(-7) } | Remove-Item -Force

          to

          Get-ChildItem -Path $global:TempDirectory -Recurse -File | Where-Object {($_.Name -match “.cab”) -or ($_.Name -match “.xml”) -and ($_.CreationTime -lt (Get-Date).AddDays(-7)) } | Remove-Item -Force

          Maurice

  • Will
    Posted at 19:20 September 8, 2017
    Will
    Reply
    Author

    Hi Maurice,

    I am trying to DL the drivers for the Acer P259 but the DL is failing. BITS is running and has been restarted but I have noticed in the log that it appears an extra “http:” is being appended to the DL string.

    ConfigMgr: Downloading from URL: http:http://global-download.acer.com/SupportFiles/Files/Support/SCCM/TMP259-M_Windows7_All.exe

    but further up in the log it is correct:

    ConfigMgr: URL Found: http://global-download.acer.com/SupportFiles/Files/Support/SCCM/TMP259-M_Windows7_All.exe

    I have tried to figure out the .PS1 myself to determine why this is happening but after a little trial and error, it has been to no avail!

    (BTW, DLs from Dell do work… it appears to be in the Acer Logic only…)

    • Maurice Daly
      Posted at 00:32 September 10, 2017
      Maurice Daly
      Reply
      Author

      Hi Will

      This might be something to do with Acer changing their links on the site. I haven’t had many people using that option, but it’s updated and fixed in the new release.

      Maurice

  • Chad Bryan
    Posted at 13:49 September 13, 2017
    Chad Bryan
    Reply
    Author

    Using 4.2.0. Unable to get it to post the driver packages in SCCM.

    ======== ConfigMgr Precision WorkStation T3500 DRIVER PROCESSING STARTED ======== 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: URL Found: http://downloads.dell.com/ 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Creating Precision WorkStation T3500 download folder 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Downloading T5810-win7-A07-XK4PK.CAB driver cab file 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Downloading from URL: http://downloads.dell.com/ 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Driver Revision: A07 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: T5810-win7-A07-XK4PK.CAB File Exists – Processing Driver Package 1/1/1601 12:00:00 AM 0 (0x0000)
    ==================== ConfigMgr DRIVER EXTRACT ==================== 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Expanding Driver CAB Source File: T5810-win7-A07-XK4PK.CAB 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Extracting Dell Drivers to E:\LIBRARY\DRIVERS\REPOSITORY\Dell\Precision WorkStation T3500\Windows7-A07 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Checking For Extracted Drivers 1/1/1601 12:00:00 AM 0 (0x0000)
    ======== DRIVER EXTRACT ISSUE DETECTED ======== 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Issues occurred while reading extracted drivers 1/1/1601 12:00:00 AM 0 (0x0000)
    ConfigMgr: Driver count in path E:\LIBRARY\DRIVERS\REPOSITORY\Dell\Precision WorkStation T3500\Windows7-A07 – 0 1/1/1601 12:00:00 AM 0 (0x0000)
    ======== ConfigMgr Precision WorkStation T3500 DRIVER PROCESSING FINISHED ======== 1/1/1601 12:00:00 AM 0 (0x0000)

  • Chad Bryan
    Posted at 16:30 September 13, 2017
    Chad Bryan
    Reply
    Author

    Disregard.

  • Tom Brown
    Posted at 15:10 September 14, 2017
    Tom Brown
    Reply
    Author

    How can models be added to this? We have some HP models that are not listed.

    • Maurice Daly
      Posted at 23:15 September 14, 2017
      Maurice Daly
      Reply
      Author

      Hi Tom,

      The model listings come direct from the vendors in the case of Dell, HP and Lenovo. In some cases it is a case that they do not support particular OS combinations through their official SCCM driver package support path.

      Maurice

  • Leave a Reply