Solved

Windows 7 DISM /add-driver not working

Posted on 2013-01-15
8
2,824 Views
Last Modified: 2013-01-23
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
0
Comment
Question by:MarkBourn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 5

Expert Comment

by:zabicki
ID: 38779070
did you install net framework in the golden image?
0
 

Author Comment

by:MarkBourn
ID: 38779099
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.
0
 
LVL 5

Expert Comment

by:zabicki
ID: 38779661
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?
0
Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

 

Author Comment

by:MarkBourn
ID: 38780224
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
0
 
LVL 5

Expert Comment

by:zabicki
ID: 38780862
can you please try to install other driver or a hotfix?

and create a new unattend.xml file with just basic settings
0
 

Author Comment

by:MarkBourn
ID: 38782076
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
0
 

Accepted Solution

by:
MarkBourn earned 0 total points
ID: 38782694
Looks Like I may have made a step forward. I beleive my issue is the fact I renamed the users\default to users\defaultOFF.

This was a suggested step when I was building my golden image to ensure the users who logon to the machine receive a copy of the user I specify in the unattend answer file.

- mounted the image
- navigated to the mount folder and renamed the users\defaultold back to users\default
- tried running the DISM /add-driver this time and it works fine.

All I need to do now is figure out why I as advised to rename the default user profile and if it is necessary.  If it is necessary then clearly I did it at the wrong step.
0
 

Author Closing Comment

by:MarkBourn
ID: 38809096
Resolved myself
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question