AutomoxAutomox

Run Dell Command (Driver updates) - Windows

VicKhan
September 15, 2020 at 7:26 pm UTC

This worklet will run Dell Command on a users machine to update to latest drivers, it also does firmware updates if found.

This is possibly a two part worklet, depending on the version of Dell Command installed. If you have the normal executable application version you can run the Run Update script below. However if running the UWP version for Win10, you need to uninstall that and install the non UWP version using the uninstall/reinstall script below (Make sure to include all needed files like the DCU executable, MUP and Package files. Those are currently available at: https://www.dell.com/support/article/en-us/sln311129/dell-command-update?lang=en

Dell Command Uninstall/Reinstall:

powershell4 lines
$dellc = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -match "Dell Command" }
$dellc.Uninstall()

Start-Process -FilePath "DCU_Setup_3_1_3.exe" -ArgumentList "/S /v/qn"

The run update command itself is:

1 line
Start-Process -FilePath "C:\Program Files (x86)\Dell\CommandUpdate\dcu-cli.exe" -ArgumentList "/applyUpdates -silent -outputLog=C:\Temp\DellCommandUpdate.log"

This creates a log file at c:\temp\DellCommandUpdate.log for review as well.

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (7)

DavidM-AutomoxSeptember 15, 2020
#1

Awesome. Using Dell Command to manage drivers is a great solution with Automox.

If you do need to pass additional arguments to the embedded msi through the command, here is a way to get double quotes around your second set of arguments:

1 line
"/S /v`"/norestart /qn`""

The back ticks will pass the double quote properly in a Worklet.

MrichardsMay 4, 2021
#2

(Reviving an old thread because @Mark-AX had linked to this guide in this thread here Automox and Drivers)

Looks like this thread contained Dell Command | Update 3.1 which required a ton of funky business to get consistently working. Since then, they have upgraded to 4.1, which is way simpler to invoke.

Remediation:
Grab the Dell command update .msi and attach to a worklet. You can make two separate worklets with installation + scanning / patching. Since automox will clean up our msi at the end and its a relatively small file, I just run it as a combo install + scan/patch.

Feel free to check out Dell’s reference guide here
https://www.dell.com/support/manuals/en-us/command-update/dellcommandupdate_rg/dell-command-|-update-cli-commands?guid=guid-92619086-5f7c-4a05-bce2-0d560c15e8ed&lang=en-us

powershell7 lines
$checkexist = Test-Path 'C:\Program Files\Dell\CommandUpdate\dcu-cli.exe' -PathType Leaf
if ($checkexist -eq $false)
{
Start-Process -FilePath ".\DellCommandUpdate41.exe" -ArgumentList '/s' -Verbose -Wait
}

& 'C:\Program Files\Dell\CommandUpdate\dcu-cli.exe' /ApplyUpdates -autoSuspendBitLocker=enable -reboot=enable
jasonruizOctober 7, 2021
#3

Hi there! Automox Newbie here. Thanks for the code above, I assume this goes into the “Remediation Code” portion of the Worklet. What would we put into the “Evaluation Code”?

David_MitchellOctober 15, 2021
#4

Something like this should work for your evaluation code. I use something a bit more complex to check version also, but this should do for most needs.

powershell58 lines
<#
.SYNOPSIS
    MSI Software Installation (64-Bit OS) - Evaluation Script
    OS Support: Windows 7 (64-Bit) and above
    Required modules: NONE
.DESCRIPTION
    This worklet is designed to grant an Admin the ability to install an MSI with minimal knowledge of the bitness,
    command line, or other MSI properties. By placing an application name between the single quotes, the worklet will
    scan the registry for the matching application. If the application is not found, it will return an Exit code of '1'
    and flag the device for remediation.

    Usage:
    Modify the following variable found in the "Make changes within this block" section of the script below.

    $appName:
    The application name provided must match exactly as it is displayed in "Programs and Features" (Add or Remove Programs)
    for Win7/8.1, and "Apps and Features" for Win10. Universal Windows Platform (UWP) applications are not currently
    supported in this worklet.

.EXAMPLE
    $appName = '7-Zip 19.00 (x64)'
.EXAMPLE
    $appName = 'Microsoft Silverlight'
.NOTES
    Author: eliles
    Date: February 26, 2021
#>

# Using scriptblock to relaunch in native environment for 64bit detection.
$scriptBlock = {

    ######## Make changes within the block ########
    # Add Application name exactly as it appears in Add/Remove Programs, Programs and Features, or Apps and Features between single quotes.
    $appName = 'Dell Command'
    ###############################################

    # Define registry location for uninstall keys
    $uninstReg = @('HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall','HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall')

    # Get all entries that match our criteria. DisplayName matches $appName (using -like to support special characters)
    $installed = @(Get-ChildItem $uninstReg -ErrorAction SilentlyContinue | Get-ItemProperty | Where-Object {($_.DisplayName -like "$appName*")})

    # If any matches were found, $installed will return a "1" and pass it to $exitCode flagging the device for remediation.
    if ($installed)
    {
        return 0
    }
    else
    {
        return 1
    }
}

# Execution of $scriptBlock
$exitCode = & "$env:SystemRoot\sysnative\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -WindowStyle Hidden -NoProfile -NonInteractive -Command $scriptblock

# Exit with value provided by $installed
Exit $exitCode
jasonruizOctober 15, 2021
#5

That worked perfectly, thank you very much!!

Mike_JanewayJanuary 31, 2022
#6

I attempted to use this worklet today and I am getting a command timed out error. The logs don’t show any other errors.

PL.OKFBNovember 15, 2022
#7

Reviving this older thread since the “Classic” interface of Dell Command Update is not support in 4.7 and has moved to the UWP version. UWP 4.7 was released in response to DSA-2022-298.

Can the worklet above still leverage UWP 4.7 for installing Dell drivers and updates?

Thanks in advance!