Political espionage Homepage
Forum Home Forum Home > computers > PC
  New Posts New Posts RSS Feed - Injecting INF w/DISM
  FAQ FAQ  Forum Search   Events   Register Register  Login Login


PLAY NICE

Injecting INF w/DISM

 Post Reply Post Reply
Author
Message Reverse Sort Order
administrator View Drop Down
Admin Group
Admin Group


Joined: 16 May 2016
Status: Offline
Points: 48
Post Options Post Options   Thanks (0) Thanks(0)   Quote administrator Quote  Post ReplyReply Direct Link To This Post Topic: Injecting INF w/DISM
    Posted: 11 Dec 2017 at 1:49pm
Mount the Windows image

Open the Deployment Tools Command Prompt and type something like this to mount the image offline

Dism /Mount-Wim /WimFile:C:\My-Wims\ref-win7-image.wim /Index:1 /MountDir:C:\ wim-mount-dir

Apply the answer file

Apply the answer file to the mounted image using DISM

DISM /Image:C:\wim-mount-dir /Apply-Unattend:C:\unattend-answer-files\oflinedrivers.xml

Unmount the Windows Image

Dism /Unmount-Wim /MountDir:C:\wim-mount-dir /commit
Don’t forget the /commit switch otherwise changes to the image will not apply.

Method 2: Using DISM to add individual INF files

This is a much easier method as it doesn’t involve the hassle of building answer files. Instead you issue DISM commands at the Deployment Tools Command Prompt to add inf files to an image.

Mount the Windows Image

At the Deployment Tools Command Prompt and type something like this to mount the image

Dism /Mount-Wim /WimFile:C:\My-Wims\ref-win7-image.wim /Index:1 /MountDir:C:\wim-mount-dir

Add an .INF Driver to an Image

Dism /Image:C:\wim-mount-dir /Add-Driver /Driver:C:\my-drivers\audio-driver.inf

Add Multiple .INF Drivers

Multiple drivers can be added by simply pointing to a folder which will install all .inf drivers found in that directory. To add drivers from subdirectories too use the /Resurse switch

Dism /Image:C:\wim-mount-dir /Add-Driver /Driver:C:\my-drivers /recurse

Adding Unsigned Drivers

64-bit computers require drivers to have a digital signature (i.e. signed drivers). To get past this requirement use the /ForceUnsigned switch to install unsigned drivers

Dism /Image:C:\wim-mount-dir /Add-Driver /Driver:C:\my-drivers /ForceUnsigned

Unmount the Windows Image

Dism /Unmount-Wim /MountDir:C:\wim-mount-dir /commit
Again, without the /commit switch none of your changes will be saved to the image.

Method 3: Copy device drivers to C:\Windows\INF\

During the Windows 7 installation process Setup searches for device drivers in the C:\Windows\INF\ directory including all subdirectories for devices on the computer and installs them as part of the same process ready to be used upon first log on.

I initially based my theory on the fact that all in-box and out of box drivers are stored in this directory so manually copying drivers here should allow Setup to find and install these drivers. I’ve found this to work absolutely fine in all my tests, including offline. (I’ve already mentioned how this works in Experiments with Sysprep and Preparing and Sysprep’ing the Reference Computer).

Here’s how this works in an offline scenario

Mount the Windows Image

At the Deployment Tools Command Prompt and type something like this to mount the image

Dism /Mount-Wim /WimFile:C:\My-Wims\ref-win7-image.wim /Index:1 /MountDir:C:\wim-mount-dir

Copy device drivers to C:\wim-mount-dir\Windows\INF\

Device drivers must be .inf files and not .exe applications. You might want to organise it in subfolders, for example

C:\Windows\INF\MyDrivers\audio64

C:\Windows\INF\MyDrivers\ethernet64

C:\Windows\INF\MyDrivers\chipset64

etc

Unmount the Windows Image

Dism /Unmount-Wim /MountDir:C:\wim-mount-dir /commit

When the .wim image is applied to a computer and turned on for the first time the device drivers will install as part of the Windows installation process, no problem.

Coming up next is Applying a Windows 7 image using ImageX.

Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.04
Copyright ©2001-2015 Web Wiz Ltd.

This page was generated in 0.360 seconds.