Error creating file and Exitcode 501 BDC_ERR_FILE_CREATE in bootwiz log when creating or recreating a boot disk or PXE image
search cancel

Error creating file and Exitcode 501 BDC_ERR_FILE_CREATE in bootwiz log when creating or recreating a boot disk or PXE image

book

Article ID: 162354

calendar_today

Updated On:

Products

Deployment Solution Ghost Solution Suite

Issue/Introduction

When creating or recreating a boot disk or PXE image, Boot Disk Creator (bootwiz.exe) fails to create the file.  The bootwiz log file shows errors like the one in the Error Message section below.

2015/09/16 17:19:26 I: ..>CPlatformWinPe2::WimUnmountFile [Platform='WINPE5_X64'] (sMountPath='C:\Users\admin\AppData\Local\Temp\2\~bootwiz\00000eac\image', sWimFilePath='C:\Users\admin\AppData\Local\Temp\2\~bootwiz\00000eac\@dot@\sources\boot.wim', dwImageIndex=1, bCommitChanges=1, nCompressionType=1, dwMilliseconds=200, pProg, bIgnoreErrors=0)
2015/09/16 17:20:11 I: .. CPlatformWinPe2::ThreadFuncWIMCaptureImage - WIMCaptureImage failed - GetLastError returned 32 (The process cannot access the file because it is being used by another process.)
2015/09/16 17:20:47 I: ..<CPlatformWinPe2::WimUnmountFile - returning thread exitcode 599 (BDC_ERR_WIM_MOUNT)
2015/09/16 17:20:47 I: .<CPlatformWinPe2::JobImg - returning 599 (BDC_ERR_WIM_MOUNT)
2015/09/16 17:20:47 I: .>CPlatform::DoMedia [Platform='WINPE5_X64'] (..., sInstallerOsType='', dwInstallerProcessorType=0x00010000 (x86), dwInstallerTaskType=0x00000000 (<none>), dwTaskType=0x00000001 (automation), dwMediaType=0x00000004 (pxe), ...)
2015/09/16 17:20:47 I: ..>CPlatformWinPe2::JobPxeImage [Platform='WINPE5_X64'] (bDebug=0, dwImageSize=1474560, BootFolder='\\ghostsrv\eXpress\PXE\MasterImages\MenuOption160.tmp\X64', pProg, pProgBusy)
2015/09/16 17:20:47 I: ...>CPlatform::DirConvert [Platform='WINPE5_X64'] (sSrc='C:\Users\admin\AppData\Local\Temp\2\~bootwiz\00000eac\@dot@', sDst='C:\Users\admin\AppData\Local\Temp\2\~bootwiz\00000eac\@dot@', sSectionFilter='CONVERT_FILES_MASK', bReplace=1, sMarkers='$$')
2015/09/16 17:20:47 I: ... CFileVars::ConvertFile (sIFile='C:\Users\admin\AppData\Local\Temp\2\~bootwiz\00000eac\@dot@\pxefixup.bat', sOFile='C:\Users\admin\AppData\Local\Temp\2\~bootwiz\00000eac\@dot@\pxefixup.bat.tmp', bReplaceFile=1, eMode=65537, sMarkerLeft='$$', sMarkerRight='$$') successful - returning true
2015/09/16 17:20:47 I: ... CFileVars::ConvertFile (sIFile='C:\Users\admin\AppData\Local\Temp\2\~bootwiz\00000eac\@dot@\pxeset.ini', sOFile='C:\Users\admin\AppData\Local\Temp\2\~bootwiz\00000eac\@dot@\pxeset.ini.tmp', bReplaceFile=1, eMode=65537, sMarkerLeft='$$', sMarkerRight='$$') successful - returning true
2015/09/16 17:20:47 I: ...<CPlatform::DirConvert - returning 0 (BDC_SUCCESS)
2015/09/16 17:20:47 I: .. First SetNamedSecurityInfo call failed: 2

2015/09/16 17:20:47 I: ...>CPlatform::CreateAtrsBoot [Platform='WINPE5_X64'] (...)
2015/09/16 17:20:47 I: ...<CPlatform::CreateAtrsBoot - returning 501 (BDC_ERR_FILE_CREATE)
2015/09/16 17:20:47 I: ..<CPlatformWinPe2::JobPxeImage - returning 501 (BDC_ERR_FILE_CREATE)
2015/09/16 17:20:47 I: .<CPlatform::DoMedia - returning 501 (BDC_ERR_FILE_CREATE)
2015/09/16 17:20:47 I:  ShowMessageBox (Error creating file )
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property sheet (CPropertySheet) '[0] Boot Disk Creator - Create Boot Image'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[411] Boot Disk Creator - Edit WinPE 5.x Configuration <BootDisk>'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[293] Boot Disk Creator - Edit WinPE 5.x Configuration <Obsolete>'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[290] Boot Disk Creator - Create WinPE 5.x Configuration <CfgEdit>'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[280] Boot Disk Creator - Create WinPE 5.x Configuration <CfgSummary>'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[292] Boot Disk Creator - Create WinPE 5.x Configuration <CfgOptions>'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[260] Boot Disk Creator - Create WinPE 5.x Configuration <CfgMapDrives>'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[250] Boot Disk Creator - Create WinPE 5.x Configuration <CfgConnection>'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[240] Boot Disk Creator - Create WinPE 5.x Configuration <CfgConsole>'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[230] Boot Disk Creator - Create WinPE 5.x Configuration <CfgTCPIPInfo>'
2015/09/16 17:23:02 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[223] Boot Disk Creator - Create WinPE 5.x Configuration <CfgDrivers>'
2015/09/16 17:23:08 D:  CBaseDlg::DoOnDestroy - Destroying property page (CPropertyPage) '[200] Boot Disk Creator - Create WinPE 5.x Configuration <CfgWelcome>'

2015/09/16 17:23:08 I: CBootWizardApp::ExitInstance- Error in cleanup DirectoryDelete

2015/09/16 17:23:08 I: CBootWizardApp::ExitInstance - Ending application instance
2015/09/16 17:23:08 I:     Exit code: (1) 1 BDC_CANCEL - Operation canceled
2015/09/16 17:23:08 I: ****************************************
2015/09/16 17:23:08 I:    Application End
2015/09/16 17:23:08 I: ****************************************

Cause

The key portion of the error message above is "WIMCaptureImage failed - GetLastError returned 32 (The process cannot access the file because it is being used by another process.)".

The error 32 is being returned by Dism.exe which is part of the WAIK.  Boot Disk Creator calls Dism.exe to create the wim file used as the boot file for PXE and other boot media.  The most common cause of this type of error is antivirus or other security software placing a file lock on the wim file which prevents Dism.exe from unmounting the file.

Resolution

To workaround this issue, temporarily exclude your antivirus or other security software from scanning the "C:\Users\<currentlyloggedinuser>\AppData\Local\Temp\" folder or temporarily exclude files called boot.wim from being scanned.