Solved

Windows 7 DISM /add-driver not working

Posted on 2013-01-15
8
2,757 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

772 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