Link to home
Start Free TrialLog in
Avatar of MarkBourn
MarkBourn

asked on

Windows 7 DISM /add-driver not working

I am trying to add drivers to a wim file I have created from a gold image.  I have trawelled loads of articles to find out why my dism line does not work and I am having no luck.  

Here is what I am doing from the Deployment tools command prompt via the start menu\microsoft windows WAIK.

---------------------------
C:\Program Files\Windows AIK\Tools\PETools>dism /mount-Wim /wimfile:g:\myimage\myimage.wim /index:1 /mountdir:c:\offline

THE ABOVE WORKS AND MOUNTS THE IMAGE.

I then run
C:\Program Files\Windows AIK\Tools\PETools>dism /image:c:\offline /add-driver /driver
:c:\drivers (C: being the location on my machine I am running DISM NOT THE C: on the image)

This fails with:
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385


Error: 2

An error occurred while attempting to access the image.
For more information, review the log file.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

I have attached the log file.

I have been following this article.:http://technet.microsoft.com/en-us/library/dd744355(v=ws.10).aspx

Any help appreciated.
dism.log
Avatar of Slav Zabicki
Slav Zabicki
Flag of Canada image

did you install net framework in the golden image?
Avatar of MarkBourn
MarkBourn

ASKER

No.  
I just checked the windows components on the golden image and DotNet3.5.1 does not have a tick but has a filled in blue square .  Not sure if this means it is installed on the standard out of the box windows 7 pro install

If it is needed for DISM to work offline can you explain why.
no you dont need to install .net on the host
hmm
run this:
dism  /image:c:\mb /add-driver /driver:g:\drivers\XXXXXX.inf  /ForceUnsigned
or
dism  /image:c:\mb /add-driver /driver:g:\drivers /recurse if you have multiple drivers.


did you unpack the driver and pointer the command to the .ini file?
dism  /image:c:\mb /add-driver /driver:g:\drivers /recurse is what I am using and it fails on ,y wim file.

I tested the process I detailed above on a wim file I did not create.  I used a setup.wim file that is the installer for windows 7 professional.  This works fine using the above command lines.

This tells me one thing that there is something wrong with my wim file.  I tried running the commands on my base (golden image) that has not been sysprepped with /generalize /oobe etc.  I also tested it on the wim file I created from the golden image using the sysprep /generalize /oobe.  

NEITHER OF MY WIM FILES WORK BUT THE ONE FROM THE WINDOWS SETUP DOES.

This means there is something wrong with my windows 7 image.

What have I missed that makes the wim shipped with windows 7 work with DISM and not mine.

Any help appreciated.

My process I followed to build my image
- install windows 7 pro from the setup CD.
- add some custom things to the image.
- run sysprep /generalize /oobe /shutdown /unattend:c:\unattend.xml

The unattend.xml file was built using windows SIM
can you please try to install other driver or a hotfix?

and create a new unattend.xml file with just basic settings
I have tried another driver and nothing works.  Can you suggest what I need to do to the golden image before I sysprep it to make the dism /add-driver work offline.  

Neither my golden image (Which has had no unattend.xml applied) OR my sealed machines which has had the unattent applied work.  

This is telling me DISM does not work on a non sysprepped wim or a sysprepped wim if I have not carried out a specific task against the image or wim file.

Q.  Can i install windows 7 on a machine.  Do nothing to it and use imagex to capture it.  Can I then use DISM to inject drivers using the add-drivers.

Something is missing or I am missing a step that is causing this to fail
ASKER CERTIFIED SOLUTION
Avatar of MarkBourn
MarkBourn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Resolved myself