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.
dwolters
  • 1,255
  • 7
  • 11
user1866880
  • 449
  • 5
  • 11
  • 20

2 Answers2

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

Ali V
  • 96
  • 4
  • 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
  • Somehow, the file size is 14 Megabytes, which is too little to be a boot image... it should be way more than that. I suggest you do the [capturing procedure](http://technet.microsoft.com/en-us/windows/preparing-an-image-using-sysprep-and-imagex.aspx) again :) You are welcome by the way, troubleshooting sometimes requires rigorous brainstorming :) – Ali V May 21 '13 at 12:11
  • Many thanks! I will try imageX capture again, this time without the "/compress fast " option. I did wonder why the boot.wim is small, I thought it was due to /compress option.. but something must have been wrong.. – user1866880 May 21 '13 at 12:22
  • By the way, the capture cmd I used is: imagex /compress fast /check /flags "Win7 Enterprise" /scroll /capture c: f:\baseimage.wim "Win7 Enterprise" – user1866880 May 21 '13 at 12:26
  • Try to do it simple and follow the link I provided, I'm curious about the result and wish you good luck :) – Ali V May 21 '13 at 12:33
  • 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 – user1866880 May 21 '13 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..:) – user1866880 May 21 '13 at 13:19
-1

Try to mount wim image with Read/Write flags.