Can I use dism.exe to apply drivers to a running machine using the /online option?

Bradley Bird 106 Reputation points
2024-05-23T14:37:38.0033333+00:00

I am trying to create a standardized recipe across hardware vendors in my environment. I use dism with /image and /apply-driver and /recurse no problem in my bare metal task sequences.

I am trying to use the same recipe to update drivers on the machines running using a different task sequence.

When I use /online I get the following error coming back:

The task sequence execution engine successfully completed the action (Drivers: Lenovo ThinkPad T14 Gen4 - 21HD, 21HE) in the group (Lenovo) with exit code 50 Action output: ... lved source to 'C:_SMSTaskSequence\Packages\DH1004F1' Command line for extension .exe is "%1" %* Set command line: Run command line Working dir 'C:_SMSTaskSequence\Packages\DH1004F1' Executing command line: Run command line with options (0, 4)Deployment Image Servicing and Management tool Version: 10.0.19041.3636

 

Image Version: 10.0.19045.4412

 

Process completed with exit code 50

 

Error: 50

 

This command can only be used with an offline image.

 

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log Command line is being logged ('OSDDoNotLogCommand' is not set to 'True') Command line DISM.exe /online /Add-Driver /Driver:.\ /Recurse returned 50 ReleaseSource() for C:_SMSTaskSequence\Packages\DH1004F1. reference count1 for the source C:_SMSTaskSequence\Packages\DH1004F1 before releasing Released the resolved source C:_SMSTaskSequence\Packages\DH1004F1 敄汰祯敭瑮䤠慭敧匠牥楶楣杮愠摮䴠湡条浥湥⁴潴汯敖獲潩㩮ㄠ⸰⸰㤱㐰⸱㘳㘳浉条⁥�.

Can I use DISM with /online at all? Or is this error actually due to something else?

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,946 questions
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager Deployment
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Deployment: The process of delivering, assembling, and maintaining a particular version of a software system at a site.
922 questions
Microsoft Configuration Manager
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Pavel yannara Mirochnitchenko 12,371 Reputation points MVP
    2024-05-23T16:19:55.1166667+00:00

    You have other, much better ways to do this. If built-in Task Sequence step Install Drivers is not enough for you, you could:

    1. Place PNPutil.exe (find from Windows folder) at root of the package and then drivers into folders. And then execute script like this.
      ####################################################
      Get-ChildItem ".*." -Recurse -Filter ".inf" |

    ForEach-Object { PNPUtil.exe /add-driver $_.FullName /install }
    ####################################################

    1. For very dynamical driver update, you can use my script here. Feel free to ask anything about this.

    Both of these solutions are suitable for CongMgr and Intune

    0 comments No comments

  2. Gary Blok 1,736 Reputation points
    2024-05-29T17:27:59.28+00:00

    You would not use DISM to install drivers while the machine is running online, DISM is meant for applying drivers to an offline OS, either to a WIM file, or during WinPE to the offline OS.

    once you're out of the WinPE stage, and running in the Full Windows environment, you should look to using the vendor tools (HP Image Assistant, Dell Command Update, Lenovo Updater), all of which can be added to a Task Sequence and run completely automated.

    You can also use Windows Update to update drivers, but I prefer the vendor tools.

    0 comments No comments