Solved

Windows 7 DISM /add-driver not working

Posted on 2013-01-15
8
2,671 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
  • 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
 

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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now