Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have just installed a reference windows 7 x64 machine, sysprep-ed it, went into WinPE mode and captured boot.wim image using ImageX.

I then moved the boot.wim to my local PC under c:\wim, and try to inject drivers into it, before I deploy the new boot.wim to other machines. However I got an error 2: Unable to access the image.

The commands I am running are (run as administrator):

Dism /Get-WimInfo /WimFile:c:\wim\boot.wim
DISM /Mount-Wim /wimfile:c:\wim\boot.wim /index:1 /MountDir:c:\mount
Dism /Image:c:\mount /Add-Driver /Driver:c:\drivers\latitude /Recurse

I have successfully injected drivers using DISM to WinPE boot image, using the same steps. So what is wrong?!!! PS: in terms of permissions, I have full-control permission over the boot.wim file and c:\wim folder. Am really puzzled and stuck.. any input is welcome

--update--

I just looked at the log file as suggested by DSIM in the command prompt. It says the Image session has been closed. How come? How can I overcome this problem?

2013-05-21 12:27:24, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: WimManager
2013-05-21 12:27:24, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: WimManager.
2013-05-21 12:27:24, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: FolderManager
2013-05-21 12:27:24, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
2013-05-21 12:27:24, Info                  DISM   DISM.EXE: Attempting to add the commands from provider: Compatibility Manager
2013-05-21 12:27:24, Info                  DISM   DISM.EXE: Succesfully registered commands for the provider: Compatibility Manager.
2013-05-21 12:27:24, Error                 DISM   DISM.EXE: Failed to access the image folder or image's windows folder.
2013-05-21 12:27:24, Info                  DISM   DISM.EXE: Image session has been closed. Reboot required=no.

--update--

To list the boot.wim info, I run Dsim command and the result seems good:

C:\Windows\system32>Dism /Get-WimInfo /WimFile:c:\wim\boot.wim

Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Details for image : c:\wim\boot.wim

Index : 1
Name : Win7 Ent64
Description : <undefined>
Size : 14,986,334 bytes

The operation completed successfully.
share|improve this question

2 Answers 2

this might be quite "lame" answer, but do you have UAC enabled by any chance, respectively are you running the elevated command prompt? Windows does crazy things when trying to access the system drive with UAC :)

share|improve this answer
    
Yes on my own PC i have UAC enabled, and I am running cmd prompt as administrator to perform these steps. –  user1866880 May 21 '13 at 11:27
    
Okay thanks for clarification... the only thing that comes to my mind, how about the C:\mount directory - does it even exist and do you have rights for the folder? –  Ali V May 21 '13 at 11:38
    
Thank you very much for just replying .. I am really stuck.. As to the permission, c:\mount was created manually, and to get things right, I explicitly added myself to have full control to the folder and its content. I just had look at the log file, and have updated my OP. –  user1866880 May 21 '13 at 11:44
    
Okay, can you somehow view the contents and integrity of the .wim file you are actually integrating your drivers into? As the log file says 2013-05-21 12:27:24, Error DISM DISM.EXE: Failed to access the image folder or image's windows folder. perhaps something went wrong with the image's windows folder? :o –  Ali V May 21 '13 at 11:51
    
I used Dsim to get wim-info, and it seems good. I have copied the output in the OP. Thanks again Ali –  user1866880 May 21 '13 at 11:54

Try to mount wim image with Read/Write flags.

share|improve this answer
    
More detail would improve this answer. –  Dave M Jun 8 at 12:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.