If you have a Windows 7 or even a Windows Server 2008 R2 Server ISO file and you need to add drivers to this ISO file, this little how-to shows you how you can do that.
- First create the following folders
C:\temp\WindowsISO (Unpack the windows.iso to this folder)
C:\temp\drivers (Add all driver folders in this folder the drivers have to be in .inf format)
C:\temp\wim (Is a temp folder for the WIM file)
C:\ temp\WindowsISOdrivers (the new .ISO file will be created here) - Download and install the Windows Automated Installation Kit
- Start Windows AIK Deployment Tools Command Prompt from Start menu
- Mount the install.wim file from C:\temp\WindowsISO to C:\temp\wim
imagex /mountrw C:\temp\WindowsISO\SOURCES\install.wim 1 C:\temp\wim
- Add Drivers with dism
CD C:\temp\drivers\Network\Emulex\M72KR\W2K8R2\x64 dism /image:C:\temp\wim /add-driver /driver:. /recurse
- Now unmount the WIM Image
imagex /unmount /commit C:\temp\wim
- Create the new ISO file
oscdimg -n -m -bc:\temp\WindowsISO\boot\etfsboot.com C:\temp\WindowsISO C:\temp\WindowsISOdrivers\windows.iso
When I try to create the ISO file he can’t find the etfsboot.com. Is ther something wrong with this line: oscdimg -n -m -bc:\temp\WindowsISO\boot\etfsboot.com C:\temp\WindowsISO . I have a windows7 machine (x64). Can you tell me why etfsboot is not there?
Ok, just to know, I’m have trouble with last command, but it work when I change the destination folder to other drive leter, example, “D:\Image\windows.iso” instead “C:\temp\WindowsISOdrivers\windows.iso”.
Thanks!
I´m having problems mounting the image :
C:\Program Files\Windows AIK\Tools\PETools>imagex /mountrw C:\temp\WindowsISO\SO
URCES\install.wim 1 C:\temp\wim
ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385
Mounting: [C:\temp\WindowsISO\SOURCES\install.wim, 1] -> [C:\temp\wim]…
Error opening file [C:\temp\WindowsISO\SOURCES\install.wim].
Invalid Data.
Try redownloading the ISO file it looks like something is not right with it.
Will this instruction work for server 2003 R2 x86 .iso images as well?
Can I use this method to roll windows updates into an iso? I am trying to update my server 2008r2sp1 iso so that with every install I don’t have to download and install 100+ updates.
Thanks for this article. My target system is also Cisco UCS. Adding drivers to the Windows installer worked like a charm, drivers for chipset and NIC were installed automatically.
The only problem was the RAID controller on the blades: This driver is needed already early in the installation process to select the target drive. Adding the driver as shown above does not help. Is it possible to add drivers to the bootloader(?) of the Windows installer?
In this scenarios you have to included the driver not only in the install.wim but also in the boot.wim.
It’s a little bit more complicated :)
Both boot.wim and install.wim contain several images, and the drivers have to be added to all the right images. boot.wim contains a Windows PE and a Windows Setup image:
$ C:\Program Files\Windows AIK\Tools\PETools>dism /Get-WimInfo /WimFile:C:\temp\Windows2008R2DE-ISO\sources\boot.wim
[…]
Index: “1”
Name: “Microsoft Windows PE (x64)”
Beschreibung: “Microsoft Windows PE (x64)”
Größe: 994.224.804 Bytes
Index: “2”
Name: “Microsoft Windows Setup (x64)”
Beschreibung: “Microsoft Windows Setup (x64)”
Größe: 1.111.505.013 Bytes
To add drivers to the second image, use
$ imagex /mountrw … 2 …
Adding the RAID driver to the PE image is not enough (maybe it’s not even necessary, for good measure I added it there anyway), but only after I added it to the Setup image, the local disks were found immediately.
And because I will use the Enterprise edition of Windows, adding the drivers to the first image of install.wim will not help either. install.wim contains these eight images:
Index: “1”
Name: “Windows Server 2008 R2 SERVERSTANDARD”
Beschreibung: “Windows Server 2008 R2 SERVERSTANDARD”
Größe: 10.662.958.902 Bytes
Index: “2”
Name: “Windows Server 2008 R2 SERVERSTANDARDCORE”
Beschreibung: “Windows Server 2008 R2 SERVERSTANDARDCORE”
Größe: 3.613.479.970 Bytes
Index: “3”
Name: “Windows Server 2008 R2 SERVERENTERPRISE”
Beschreibung: “Windows Server 2008 R2 SERVERENTERPRISE”
Größe: 10.663.340.207 Bytes
Index: “4”
Name: “Windows Server 2008 R2 SERVERENTERPRISECORE”
Beschreibung: “Windows Server 2008 R2 SERVERENTERPRISECORE”
Größe: 3.613.454.107 Bytes
Index: “5”
Name: “Windows Server 2008 R2 SERVERDATACENTER”
Beschreibung: “Windows Server 2008 R2 SERVERDATACENTER”
Größe: 10.622.106.952 Bytes
Index: “6”
Name: “Windows Server 2008 R2 SERVERDATACENTERCORE”
Beschreibung: “Windows Server 2008 R2 SERVERDATACENTERCORE”
Größe: 3.613.492.173 Bytes
Index: “7”
Name: “Windows Server 2008 R2 SERVERWEB”
Beschreibung: “Windows Server 2008 R2 SERVERWEB”
Größe: 10.631.108.924 Bytes
Index: “8”
Name: “Windows Server 2008 R2 SERVERWEBCORE”
Beschreibung: “Windows Server 2008 R2 SERVERWEBCORE”
Größe: 3.612.357.637 Bytes
So I added the drivers to the third image of install.wim.
Hello,
i have a problem with Windows Server 2008 R1 !
this version does not read the drive when the install start thats mean this windows need to add the sata driver to it
and i already did that by mounting boot.wim and add it ( on index 2 )
but the windows still cant read the drive
after that i added the driver to install.wim too same problem (index 3)
what i should to do to solve this problem ?
I just wanna add that Windows7 USB/Download tool does not work with .iso!
I used dism to add drivers to DaRT, and I did -u2 instead of -n to create UDF to upload it to by usb stick)
after mounting i given this but not working
i have a confusion this two line are one instruction or two
in this line any changes i have to make
Add Drivers with dism
CD C:\temp\drivers\Network\Emulex\M72KR\W2K8R2\x64
dism /image:C:\temp\wim /add-driver /driver:. /recurse
I am trying to add a USB 3 driver to SBS 2011. I have an Intel server board S1200SPL that requires the image to have USB 3 to run the setup. Without it there is no mouse or keyboard access once the setup process is installed. I have downloaded the driver from the Intel site. When I add the driver it fails with error 5. How do I debug this?
This is what Worked for Me!
I recently bought a Lenovo ThinkPad P50 in which there are 4 USB 3.0 ports but not a single USB 2.0 port or DVD drive (perhaps because Intel Skylake processor does not have support for legacy USB drives). It was getting quite impossible to simply get Windows 7 USB drive to boot!
1.) Make an ISO from your Windows 7 DVD by any free tool such as MagicDisc, DAEMON Tools, InfraRecorder, etc..
2.) Download the “Win7UsbPatcher(v2.0.14)” from ASROCK website (http://www.asrock.com/microsite/Win7Install/). Unpack and run the tool .
3.) The tool will inject the necessary USB 3.0 drivers into the Windows 7 ISO, and when complete, it will create a new patched Windows 7 ISO.
4.) You can burn this new Windows 7 ISO to a DVD drive, or you can download Rufus tool to create a bootable USB drive from the Windows 7 ISO.
5.) Now you can use this new USB/DVD to boot Windows 7 in your laptop!
Will this instruction work for server 2008 R2 x64 .iso images as well?
yes should work as well
In case you want to add unsigned drivers add ‘/forceunsigned’in step 5 line 2:
dism /image:C:\temp\wim /add-driver /driver:. /recurse /forceunsigned
Hi,
how can I inject strorage driver into a existing capture image? When I try to boot via WDS server, the local drive does not show up. I have a Dell Optiplex 7050. Storage controller: IRST Sata contolller and Standard NVM Express Contoller.
Hello, I bought a new hp proliant ml10 gen9 server for my company to install Windows server 2008 standard and sap netwear but during installation process the mouse and keyboard hangs even though it works well in bios. I tried installing windows server 2012 and it worked fine. I did my little research why my keyboard and mouse hangs when installing 2008 and got to understand that my server came with USB 3.0 chip which was missing in 2008 and the only solution was for me to inject the driver into my iso (install. Wim and boot. Wim) I have tried different methods on driver injection online but was only able to mount the image, get an error:50 when trying to add drivers. Funny enough I was able to Inject usb 3.0 drivers into windows server 2008 R2 but need Windows server 2008 standard edition. So is any solution out there on how to inject usb 3.0 drivers into windows server 2008 standard?
Thanks for the guidelines. Installation of drivers seems easy now.
Thanks & Regards,
Jack
This is amazing
Hi Thomas,
Thanks for the guide, I am having trouble after creating the new .iso file.
The Windows installer fails, the installer.wim file cannot be found, even though i can see it in the sourec folder.
Any help would be greatly appreciated.
Thanks,
Hi Josh
Looks might there be something wrong with the file paths, can you check that the install.wim is on the right place?
Excelent helpfull topic! I have no mistakes atoll and everuthing went fine from first try. Thank you very much!
my Windows has no install.wim but install.esd instead. Can’t manage to convert from esd to wim with DISM.
It worked for me thank you ….
Great! Thank you :)
Hallo dear Thomas,
im trying your help how to add tge HD driver inside win iso it works all up to the point 5..dsim ..when im trying i got in the promt menu the message like
“Installing 1 of 4 -C:\tempdrivers\istorac.inf: Error – The driver pacakge contains x64 boot-critical drivers, but the drivrs are not properly signed.
Use the /forceunsigned option to install the drivers.
Can you please help to me fix this issue
With best regards
Stanislav
I am trying to install W10x86 onto a Lenovo M910s. The computer can run x86. When I boot up with my W7 media, however, mouse & keyboard control is lost. I can adjust the bios to use a “virtual keyboard” BUT I can’t seem to find an x86 keyboard mouse driver that the M910s likes. Are there any generic keyboard/mouse drivers that you have had especially good luck with?
After I entered the command for it to unmount and commit, I saw there are numerous info signs such as “[ INFO ] Ignoring Extended Attributes in [c:\temp\wim\Windows\System32\cAVS\Communication DLLs\IntelAudioDll_x64.dll]”, eventually, it completed the process. Does this means the drivers are not commit in the ISO image? What does the sentence means?
after we un-installed drivers from working server, server is not booting with no visible boot device, can we inject drivers back again through WinRe ?