OSD : Capture Operating System Image Step failed with HRESULT=80070002

Last week I received a call from one of my customers asking me to help him with a strange error he was receiving in the step “Capture Operating System Image” of an OSD Task Sequence. The following is the log created by the step with detailed information on the error (I substituted the real file name with <FILENAME>)

WIM has entered capture phase for 74689 items CaptureSystemImage
The system cannot find the file specified. (Error: 80070002; Source: Windows) CaptureSystemImage
hVolumeImage = WIMCaptureImage( m_hImageFile, const_cast<LPWSTR>(pathTargetVolume.c_str()), WIM_FLAG_VERIFY ), HRESULT=80070002 (e:\nts_sms_fre\sms\framework\tscore\wimfile.cpp,430) CaptureSystemImage
Unable to capture the volume image (0x80070002) CaptureSystemImage
ImageFile.CaptureVolumeImage( (*itr), &saFilesToNotCapture), HRESULT=80070002 (e:\nts_sms_fre\sms\client\osdeployment\capturesystemimage\capturesystemimage.cpp,747) CaptureSystemImage
CaptureSystemImage( progressUi, slVolumesToCapture, sOfflineSystemRoot, ImageFile), HRESULT=80070002 (e:\nts_sms_fre\sms\client\osdeployment\capturesystemimage\capturesystemimage.cpp,909) CaptureSystemImage
Failed to capture system image.
The system cannot find the file specified. (Error: 80070002; Source: Windows) CaptureSystemImage

The strange think with this error is that the file specified in the log was present on the disk and was readable, so we were unable to understand why the step failed with a file not found error during the capture. The first think we tried was to capture the partition with ImageX, to understand if the problem could be related to a bug of the Capture utility used by OSD or if there was a problem on the partition captured. Imagex failed with the same error but occurred on a different file. The next step has been to capture a Process Monitor trace during the ImageX execution. The following is a screenshot of the Process Monitor trace output :


As it can be seen a DISK FULL error occurred during the creation of a temporary file used by ImageX, this was the real cause of our problem, the error “The system cannot find the file specified.” was only a consequence. If compression is specified on the command line, ImageX writes Temporary files locally (a compressed copy of the originals) before adding them to the image (that in our case was on a network share). We resolved the problem increasing the free space on the partition.

With ImageX the path of the temporary file could be specified with the command line option /TEMP so a possible workaround is to specify a different location for them, unfortunately I was not able to find a way to do the same think with the step “Capture Operating System Image” so the only workaround we found was to free up some space.

– Fabrizio

This posting is provided “AS IS” with no warranties, and confers no rights.



  1. #1 by Fabrizio Guaitolini on February 24, 2011 - 6:36 pm

    The problem is confirmed in the following KB : http://support.microsoft.com/kb/929678

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: