/build/static/layout/Breadcrumb_cap_w.png

Task to check driver support, warning end user if not found in database?

I would like to include a task in manually initiated System image deployments that will prompt an error message that warns the end user (usually a technician) performing the deployment that the system does not appear to be in the driver feed, giving them the option to continue or break off imaging.

It looks like the Display Device Compatibility HTA has this potential but I'm having difficulty locating documentation for it.
It looks like the default task is configured to pass the environmental variable %OS% to it, but that would likely be WINDOWS_NT.

I played around with driver feed advisory a bit but it doesn't appear to throw an exit error if drivers aren't found for that platform.

Are there any known built-in or community workflows that can accomplish this? Or maybe even a recommended practice?

My fall back plan will likely be a powershell script that checks for the existence of y:\drivers_postinstall\[Manufacturer (any spaces and characters after removed)]\[OS]\[Model] (any spaces and characters before last characters removed)]    And then prompts with a continue/abort message if the path isn't found, throwing an exit code if abort is chosen.


2 Comments   [ + ] Show comments
  • Hard one...

    Maybe create a Bat file that will list all drivers in drivers_postinstall into a TXT file. That way, they will have an updated list before starting the Deployment?

    I am assuming you do not want them to have access to the Drivers_postinstall share. - Channeler 5 years ago
    • It would essentially run as the first pre-imaging task and verify whether or not the system has drivers for the target os within the feed. If I had to write a script, it would dynamically generate the driver path and look for it within Y: which all systems mount within the KBE - Kiyolaka 5 years ago
  • Hi All, I ended up writing a script that accomplishes this. I just feed it the -TargetOS value (e.g. windows_10_x64


    # Script to check Driver feed for system drivers.

    # Allow Target OS input parameter
    Param(
    [string]$TargetOS
    )



    $SystemManufacturer = (get-wmiobject win32_computersystem).Manufacturer
    $SystemModel = (get-wmiobject win32_computersystem).model


    # capture the output of the driver feed advisor as a value
    $DriverFeedAdvisorOutput = (&"$ENV:SystemRoot\System32\DriverFeed_Advisor.exe")

    # convert the driver feed advisor return into a valid folder structure for the target OS.
    $DriverPath = $DriverFeedAdvisorOutput -replace '\\\\SDA|\\\\RSA',"Y:" -replace "windows_10_x64|windows_10_x86","$TargetOS"


    if (!(test-path "$DriverPath")){

    # Add the windows forms assembly
    Add-Type -AssemblyName System.Windows.Forms | Out-Null

    # Set up message box form attribute.
    $MsgBox = [System.Windows.Forms.MessageBox]

    # Set up the message and title values
    $Title = "System Drivers not found in Driver Feed"
    $Message = "Drivers were not found for $SystemManufacturer $SystemModel for $TargetOS . Select Cancel to abort or OK to continue anyway"


    $Decision = $MsgBox::Show($Message,$Title,"OkCancel", "Warning")

    If ($Decision -eq "Cancel") {
    # Exit with error code of 3
    Write-Output "Aborting Task" |Out-Host
    exit 3
    }



    } ELSE {

    Write-Output "Drivers were found for $SystemManufacturer $SystemModel" |Out-Host

    } - Kiyolaka 5 years ago

Answers (2)

Posted by: andrew_lubchansky 5 years ago
2nd Degree Black Belt
1
Utilizing Driver Feed Advisor from within a KBEM built KBE will get you most of what you need.  Create a Preinstall Task with:

X:\windows\system32\driverfeed_advisor.exe /kbe /w10
pause

DFA with the /kbe flag will give a message whether the correct folders are present or not.  The /w10 flag is to force it to check for a windows 10 driver feed, regardless of what may be already installed.  We need the pause in order to stop the deployment so you can read the message.  This has the side effect of pausing every deployment though.

The importance of using DFA is that is built to take advantage of the SDAs naming scheme for Driver Feeds, which may not 100% match what you pull manually with another script.

Comments:
  • Thanks, the Driver feed adviser doesn't seem to set an error level if the driver isn't found but I should at-least be able to use the text return to help simplify the generation of the folder path to test. - Kiyolaka 5 years ago
Posted by: Nico_K 5 years ago
Red Belt
0
you need to do this manually.
Create a manual script which checks for the device as the feed discovery recognizes it and then check if the drivers_postinstall folder with the correct path is avaiable.

You can find all nessesary under \\SDA\drivers_postinstall\ on your SDA.

Since this is not a bad idea at all you should go to kace.uservoice.com and suggest this as a new feature.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ