Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Windows 7 DISM /add-driver not working

Posted on 2013-01-15
8
Medium Priority
?
3,150 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:Slav 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:Slav 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
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 

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:Slav 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
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 viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

604 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