The Windows Server 2008 and Windows Server 2008 R2 ADPREP /FORESTPREP command may fail with the error "the call back function failed" with status 0x80070002 or 0x80070020 if 3rd-party applications establish a lock on files used by ADPREP. Execute the steps in the resolution section of this article if the symptoms match a similar failure in your environment.
This article does not pertain to cases where ADPREP fails with the error "the call back function failed" but with status codes different than 0x80070002 or 0x80070020.
ADPREP /FORESTPREP reports that "Adprep was unable to complete because the call back function failed" and one of two error strings above the "[User Action]" section of the error text: The full error text is listed below: Example 1: ADPREP cannot move LDIF file
ORAdprep was unable to complete because the call back function failed.
[Status/Consequence]
Error message: Error(110) while running ""C:\WINDOWS\system32\LDIFde.exe" -o ObjectGuid -d "CN=msCOM-PartitionSet-Display,CN=401,CN=DisplaySpecifiers,CN=Configuration,DC=contoso,DC=com" -u -f "C:\DOCUME~1\<username>\LOCALS~1\Temp\<file name>.tmp" -j "C:\WINDOWS\debug\adprep\logs\<YYYMMDD######>" -s <dc name>.<FQDN>". Could not
move file C:\WINDOWS\debug\adprep\logs\<YYYMMDD######>\LDIF.err to C:\WINDOWS\debug\adprep\logs\<YYYMMDD######>\DisplaySpecifierUpgradeLdifError.001.txt. The system cannot find the file specified. (0x80070002).
[User Action]
Check the log file ADPrep.log, in the C:\WINDOWS\debug\adprep\logs\<YYYMMDD######> directory for more information.
Adprep was unable to update forest information.
[Status/Consequence]
Adprep requires access to existing forest-wide information from the schema master in order to complete this operation.
[User Action]
Check the log file, ADPrep.log, in the C:\WINDOWS\debug\adprep\logs\<YYYMMDD######> directory for more information.
Error 110 maps to ERROR_OPEN_FAILED “The system cannot open the device or file specified.” Error 0x80070002 maps to ERROR_FILE_NOT_FOUND "The system cannot file the file specified."
Note The attribute cited in the LDIFDE attribute may vary. If the 110 and 0x80070002 strings match in an ADPREP /FORESTPREP failure, you have a probable match. Example 2: ADPREP cannot delete LDIF file
Adprep was unable to complete because the call back function failed.
[Status/Consequence]
Error message: C:\WINDOWS\debug\adprep\logs\<YYYMMDD######>\LDIF.log The process
cannot access the file because it is being used by another process.
(0x80070020).
[User Action]
Check the log file ADPrep.log, in the C:\WINDOWS\debug\adprep\logs\<YYYMMDD######> directory for more information.
Adprep was unable to update forest information.
[Status/Consequence]
Adprep requires access to existing forest-wide information from the schema master in order to complete this operation.
[User Action]
Check the log file, ADPrep.log, in the C:\WINDOWS\debug\adprep\logs\<YYYMMDD######> directory for more information.
Error 0x80070020 maps to ERROR_SHARING_VIOLATION "The process cannot access the file because it is being used by another process."