Windows 10: DISM - Add or Remove Drivers on an Offline Image

Discus and support DISM - Add or Remove Drivers on an Offline Image in Windows 10 Tutorials to solve the problem; Question, does PersistAllDeviceInstalls need to be in Sysprep? Also should there be a second reminder that adding drivers to a DISM image is... Discussion in 'Windows 10 Tutorials' started by Jerry06, Oct 11, 2017.

  1. Jerry06 Win User

    DISM - Add or Remove Drivers on an Offline Image


    Question, does PersistAllDeviceInstalls need to be in Sysprep?

    Also should there be a second reminder that adding drivers to a DISM image is hardware dependent

    :)
     
    Jerry06, Oct 11, 2017
    #1

  2. DISM

    I managed to mount image with command Dism /Mount-Wim /WimFile:C:\images\install.wim /Index:1 /MountDir:C:\test\images. Now I have a problem with adding drivers. Tried 2 commands:

    Dism /Image:C:\test\images\offline /Add-Driver /Driver:C:\drivers\hp630x64.inf; and

    Dism /Add-Driver /Image:C:test\images /Driver:C:\drivers\hp630x64.inf.

    Both don't work.
     
    MiodragMilincic, Oct 11, 2017
    #2
  3. Windows 7 backup on Windows 10 system is restoroing to a restore point

    We seem to go from one problem to another! I have attempted to run the DISM commands from a command prompt administrator. I include here the command results., which shows that the DISM setup on my PC does not match what you expected, and does not work
    any way: -
    Microsoft Windows [Version 10.0.15063]

    (c) 2017 Microsoft Corporation. All rights reserved.
    C:\WINDOWS\system32>sfc /scannow
    Beginning system scan. This process will take some time.
    Beginning verification phase of system scan.

    Verification 100% complete.
    Windows Resource Protection did not find any integrity violations.
    C:\WINDOWS\system32>dism/online/optimize-image
    Deployment Image Servicing and Management tool

    Version: 10.0.15063.0

    Error: 87
    The online/optimize-image option is unknown.

    For more information, refer to the help by running DISM.exe /?.
    The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
    C:\WINDOWS\system32>DISM.exe /Online /?
    Deployment Image Servicing and Management tool

    Version: 10.0.15063.0
    Image Version: 10.0.15063.0

    The following commands may be used to service the image:
    WINDOWS EDITION SERVICING COMMANDS:
    /Optimize-Image - Performs specified configurations to an offline

    image.

    /Set-ProductKey - Sets the product key of the offline image.

    /Get-TargetEditions - Displays a list of Windows editions that an image

    can be upgraded to.

    /Get-CurrentEdition - Displays the edition of the current image.

    /Set-Edition - Upgrades an image to a higher edition.
    DEFAULT ASSOCIATIONS COMMANDS:
    /Remove-DefaultAppAssociations - Removes the default application associations

    from a Windows image.

    /Import-DefaultAppAssociations - Imports a set of default application

    associations to a Windows image.

    /Get-DefaultAppAssociations - Displays the list of default application

    associations from a Windows image.

    /Export-DefaultAppAssociations - Exports the default application associations

    from a running operating system.
    PROVISIONING PACKAGE SERVICING COMMANDS:
    /Get-ProvisioningPackageInfo - Gets the information of provisioning package.

    /Add-ProvisioningPackage - Adds provisioning package.
    APPX SERVICING COMMANDS:
    /Set-ProvisionedAppxDataFile - Places custom data into the specified app

    package (.appx or .appxbundle). The specified

    application package must already be in the image.

    /Remove-ProvisionedAppxPackage - Removes app packages (.appx or .appxbundle)

    from the image. App packages will not be installed

    when new user accounts are created.

    /Add-ProvisionedAppxPackage - Adds app packages (.appx or .appxbundle) to the

    image and sets them to install for each new user.

    /Get-ProvisionedAppxPackages - Displays information about app packages

    (.appx or .appxbundle) in an image that are

    set to install for each new user.
    UNATTEND SERVICING COMMANDS:
    /Apply-Unattend - Applies an unattend file to an image.
    DRIVER SERVICING COMMANDS:
    /Remove-Driver - Removes driver packages from an offline image.

    /Add-Driver - Adds driver packages to an offline image.

    /Get-DriverInfo - Displays information about a specific driver

    in an offline image or a running operating system.

    /Get-Drivers - Displays information about all drivers in

    an offline image or a running operating system.

    /Export-Driver - Export all third-party driver packages from an

    offline image or a running operating system.
    INTERNATIONAL SERVICING COMMANDS:
    /Set-LayeredDriver - Sets keyboard layered driver.

    /Set-UILang - Sets the default system UI language that is used

    in the mounted offline image.

    /Set-UILangFallback - Sets the fallback default language for the system

    UI in the mounted offline image.

    /Set-UserLocale - Sets the user locale in the mounted offline image.

    /Set-SysLocale - Sets the language for non-Unicode programs (also

    called system locale) and font settings in the

    mounted offline image.

    /Set-InputLocale - Sets the input locales and keyboard layouts to

    use in the mounted offline image.

    /Set-TimeZone - Sets the default time zone in the mounted offline

    image.

    /Set-AllIntl - Sets all international settings in the mounted

    offline image.

    /Set-SKUIntlDefaults - Sets all international settings to the default

    values for the specified SKU language in the

    mounted offline image.

    /Gen-LangIni - Generates a new lang.ini file.

    /Set-SetupUILang - Defines the default language that will be used

    by setup.

    /Get-Intl - Displays information about the international

    settings and languages.
    APPLICATION SERVICING COMMANDS:
    /Check-AppPatch - Displays information if the MSP patches are

    applicable to the mounted image.

    /Get-AppPatchInfo - Displays information about installed MSP patches.

    /Get-AppPatches - Displays information about all applied MSP patches

    for all installed applications.

    /Get-AppInfo - Displays information about a specific installed MSI

    application.

    /Get-Apps - Displays information about all installed MSI

    applications.
    PACKAGE SERVICING COMMANDS:
    /Add-Package - Adds packages to the image.

    /Remove-Package - Removes packages from the image.

    /Enable-Feature - Enables a specific feature in the image.

    /Disable-Feature - Disables a specific feature in the image.

    /Get-Packages - Displays information about all packages in

    the image.

    /Get-PackageInfo - Displays information about a specific package.

    /Get-Features - Displays information about all features in

    a package.

    /Get-FeatureInfo - Displays information about a specific feature.

    /Cleanup-Image - Performs cleanup and recovery operations on the

    image.

    /Add-Capability - Add a capability to one image.

    /Remove-Capability - Remove a capability from one image.

    /Get-Capabilities - Get capabilities in the image.

    /Get-CapabilityInfo - Get information of a capability in the image.
    For more information about these servicing commands and their arguments,

    specify a command immediately before /?.
    Examples:

    DISM.exe /Image:C:\test\offline /Apply-Unattend /?

    DISM.exe /Image:C:\test\offline /Get-Features /?

    DISM.exe /Online /Get-Drivers /?
    C:\WINDOWS\system32>Dism /Online/Optimize-Image
    Deployment Image Servicing and Management tool

    Version: 10.0.15063.0

    Error: 87
    The online/optimize-image option is unknown.

    For more information, refer to the help by running DISM.exe /?.
    The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log
    C:\WINDOWS\system32>Dism/Online/Optimize-Image
    Deployment Image Servicing and Management tool

    Version: 10.0.15063.0

    Error: 87
    The online/optimize-image option is unknown.

    For more information, refer to the help by running DISM.exe /?.
    The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

    C:\WINDOWS\system32>

    The DISM log file ends with an error code 80070057. I have not added it here because of its size. I have run SFC /SCANNOW again, as you can see.
     
    MurrayMuspratt-Rouse, Oct 11, 2017
    #3
  4. Kari Win User

    DISM - Add or Remove Drivers on an Offline Image

    Yes, in answer file.


    That is so obvious, who on earth would think that adding for instance NVidia GPU drivers to media used to install on system with AMD GPU would work?

    Anyway, that is mentioned at the beginning of the tutorial:

    DISM - Add or Remove Drivers on an Offline Image [​IMG]
    Information A default Windows install media is hardware independent, meaning that it can be used to install Windows on any hardware capable of running Windows. Windows will be installed with default drivers, then after the installation Windows Update searches for correct drivers installing them or the user installs drivers manually using ones provided by manufacturer.

    If the install media will be used on specific hardware, you can shorten the time required to install Windows, as well as time required for post install update by adding hardware specific drivers to install media.
     
  5. Jerry06 Win User
    Thanks. Sorry about the second part with the reminder suggestion.
     
    Jerry06, Oct 11, 2017
    #5
  6. DavidY Win User
    Ah I thought you might be doing the DISM/drivers one.

    It is good info and I use parts of this frequently when I'm reinstalling on my old hardware and need to manually add drivers.

    I would suggest DISM /Get-Drivers as an alternate to the Powershell step in 2.2 - the table format is quite useful I find.

    One method of applying the drivers I tried which seems to work (not sure how valid it is) when clean-installing a machine as a one-off:
    • Export drivers as per Step 2
    • Use DISM /Get-Drivers to show which driver is which, and copy only the ones I know are problematic to a subfolder, and add this subfolder to a bootable Windows 10 Setup USB
    • Boot Windows 10 Setup from the USB
    • Open a command prompt with Shift F10, type command 'wpeutil shutdown' but don't press enter. Instead, Alt-Tab back to Setup
    • Follow the normal clean install process, delete partitions and let it install the relevant edition
    • When it says Restarting in a few seconds, quickly Alt-Tab to the command prompt and press enter, to stop it restarting but shut down instead
    • Boot again from the USB, go straight into Shift-F10, and use DISM /add-driver to add relevant drivers to the offline Windows drive as per Step 4
    • wpeutil shutdown again, and let it restart this time, so that Windows boots and finishes configuring itself with the new drivers available to it.
    I found it easier than Mounting the image and also means I don't change the .WIM so I can use that on other hardware without fear of non-standard (and probably quite old) drivers getting in the way .

    Although in some cases I could install and change it once Windows is up and running , one of 1709's default drivers causes a BSOD during installation itself, if I don't add the alternative manually using the above technique before it gets to that point.

    But it's not a technique I've seen anywhere else so I'm probably bending the rules somewhere. *Wink
     
    DavidY, Apr 4, 2018
    #6
Thema:

DISM - Add or Remove Drivers on an Offline Image

Loading...
  1. DISM - Add or Remove Drivers on an Offline Image - Similar Threads - DISM Add Remove

  2. Using DISM to restore offline image

    in Windows 10 Installation and Upgrade
    Using DISM to restore offline image: Hi Microsoft, My windows 10 bootloader is corrupted. I receive errors 0xc0000225 and 0xc0000098 while booting. I have found different methods on internet to fix it but none of it seemed to work. I was trying to repair my image using dism.exe but the problem i am facing...
  3. Remove Recovery Image?

    in Windows 10 Installation and Upgrade
    Remove Recovery Image?: C:\Windows\System32\Recovery is 366 MB due to the recovery image winre.wim I make backup images of my C: drive every day. I also maintain backup images of 'milestones' such as my clean install of Windows 10. In the unlikely event that I want to actually reinstall Windows...
  4. dism offline repair fails with 'The cleanup-image option is unknown."

    in Windows 10 Updates and Activation
    dism offline repair fails with 'The cleanup-image option is unknown.": Hello I have a laptop that I took the HDD out of and connected it to another Windows 10 machine. I ran the command Dism /Image:e:\ /Cleanup-Image /RestoreHealth but get the error Deployment Image Servicing and Management tool Version: 10.0.10240.16384 Image...
  5. Add Remove Programs

    in Windows 10 Software and Apps
    Add Remove Programs: I have access to the CP but when I click on add remove programs and try to remove one, I am redirected right back to the desktop. This type of Bug should have been solved months ago, oh wait It worked months ago but now 2 days from launch and it doesn't. 9113
  6. DISM only works with ISO Image

    in Windows 10 Performance & Maintenance
    DISM only works with ISO Image: I have a Dell XPS 8700 with a clean install of WIN10 that has been running without errors since early August. Yesterday I decided to run SFC /scannow to see if everything was OK. It reported that the file "Microsoft.PowerShell.Host.psd1" needed to be fixed but ultimately...
  7. How to Add Driver of an .exe file to an Offline Windows Image

    in Windows 10 Installation and Upgrade
    How to Add Driver of an .exe file to an Offline Windows Image: How to Add Driver of an .exe file to an Offline Windows Image? I know how to of a driver in a compressed file by using DISM but don't know of an Intel (or any company else) driver in form of .exe file 102024
  8. creating usb pen for dism apply-image

    in Windows 10 Installation and Upgrade
    creating usb pen for dism apply-image: I have managed to create a USB pen drive to apply WIM images using the DISM Apply-image command in 64bit so I know it can be done but any ideas how to create a pen to apply 32bit WIM images 24718
  9. Add/Remove Programs

    in Windows 10 Support
    Add/Remove Programs: Hello, Where is that listing, that W7 had, to easily remove installed programs ? Was called Add/Remove Want to get rid of the McAfee anti virus that came with the brand new PC I now have. And, if I plug in an external HD, how do I access it/switch to it, to use ?...
  10. Dism /Apply-Image and remove the entire content of the directory

    in Windows 10 Support
    Dism /Apply-Image and remove the entire content of the directory: Hi I installed Windows ADK 10 v1511 on Windows 10 v1511 Enterprise 64 bit. I typed the following commands: Code: Dism /Apply-Image /ImageFile:"<wim_File_Path>\install.wim" /Index:1 /ApplyDir:"<Apply_Directory_Path>" /Verify /CheckIntegrity Dism /Capture-Image...

Users found this page by searching for:

  1. dism command to add drivers for 32bit operating system

    ,
  2. dism offline uninstall driver

    ,
  3. Dism.exe /mount-wim add drivers

    ,
  4. Dism /image:C:\test\offline /Set-SetupUILang:,
  5. dism.exe get-drivers .wim,
  6. dism commands adding drivers,
  7. how can i add driver in my windwos 7 by dism,
  8. dism drivers offline,
  9. dism eport driver offline comnand,
  10. use dism command to get appx package info,
  11. dism online healtrestore on especific drive,
  12. dism /add-driver,
  13. dism add package unknown,
  14. dism add capabilities offline,
  15. Dism /Online /Add-Driver /Driver:D:\Backup