1

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.

2 Answers 2

0

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

11
  • Yes on my own PC i have UAC enabled, and I am running cmd prompt as administrator to perform these steps. May 21, 2013 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, 2013 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. May 21, 2013 at 11:44
  • 1
    The driver injection is now running happily. The problem is not so much about the fancy imagex options, but lies in the fact that on the reference PC, I captured the wrong drive. Normally c: is the drive to capture, but on the new dell laptop, although I have only c May 21, 2013 at 13:16
  • 1
    although I have only c: and have installed windows7 on it, but in winpe mode, looking into each drive, it shows c: is reserved, and d: is the windows 7 drive. This is something I overlooked. Thank you so much! i wish i can buy u a beer..:) May 21, 2013 at 13:19
-1

Try to mount wim image with Read/Write flags.

1
  • More detail would improve this answer.
    – Dave M
    Jun 8, 2014 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .