Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

CopyProfile fails with FindLatestProfile failed (0x80070003) error during Windows 7 deployment


View products that this article applies to.

Symptoms

Consider the following scenario:
  • You prepare a Windows 7 image by using Sysprep.exe.
  • In the answer file that is passed to Sysprep, the CopyProfile value is set to True.
  • You boot to WinPE, and you apply the image by using the ImageX tool or DISM.
In this scenario, when the computer boots into Mini-Setup, the setup fails, and you receive the following error message:

Windows could not parse or process the unattend answer file for pass [specialize]. The settings specified in the answer file cannot be applied. The error was detected while processing settings for component [Microsoft-Windows-Shell-Setup]


If you gather the %WINDIR%\Panther directory from the computer that has the failed deployment, and you examine the corresponding Setuperr.log file under the UnattendGC folder, you see the following errors:

2011-03-28 12:16:58, Error [Shell Unattend] _FindLatestProfile failed (0x80070003) [gle=0x00000003] 2011-03-28 12:16:58, Error [Shell Unattend] CopyProfile failed (0x80070003) [gle=0x00000003] 2011-03-28 12:17:25, Error [windeploy.exe] Setup.exe failed, returning exit code [0x1f] 2011-03-28 12:17:25, Error [windeploy.exe] Failure occured during online installation. Online installation cannot complete at this time.; hr = 0x80004005 


↑ Back to the top


Cause

This problem may occur if you manually delete the profile folder that is located in the \Users folder. This action causes an inconsistent image state, and leaves the profile information orphaned in the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

↑ Back to the top


Workaround

To work around this problem on a WIM image on which Sysprep was run and captured, follow these steps:
  1. Mount the WIM image by using the following DISM command:
    DISM /Mount-Wim /WimFile:<path to the wim file> /index:<index number> /MountDir:<Path to an empty Mount Directory> 
  2. Start Registry Editor. To do this, click Start, type regedit in the Start Search box (or on the Start Screen in Windows 8), and then click regedit.exe or Registry Editor in the results.
  3. Select the HKEY_LOCAL_MACHINE key, and then click Load Hive on File menu.
  4. In the Load Hive window, locate the mount directory in which the WIM file is mounted, open the %WINDIR%\System32\Config folder, and click SOFTWARE. When you are prompted for a key name, type test.
  5. In the Registry Editor winodw, locate the following subkey :
    HKEY_LOCAL_MACHINE\test\Microsoft\Windows NT\Current Version\ProfileList
  6. Delete the key that corresponds to the user profile that is based on the path in the ProfileImagePath value.

    Note The key name is the SID that is associated with the user profile and user account. The value points to \Users\<user name>, as shown in the screenshot in the "Cause" section.

↑ Back to the top


More Information

To delete a user profile correctly from an image before you run the Sysprep tool on the image, do not delete the corresponding folder under \Users. Instead, use one of the following methods.

Method 1

  1. In Control Panel, click System to open the System Properties item.
  2. Click Advanced system settings to open the System Properties screen.
  3. On the Advanced tab, under User Profiles, click Settings.
  4. In the User Profiles screen, select the user profile that you want to delete, and then click Delete. Click Yes to confirm the deletion.

Method 2

Run the following WMI command to delete the User profile:
wmic /node:"localhost" path win32_UserProfile where LocalPath="c:\\users\\user1" Delete 

↑ Back to the top


Keywords: kbexpertiseadvanced, kbprb, kb

↑ Back to the top

Article Info
Article ID : 2530664
Revision : 1
Created on : 1/7/2017
Published on : 5/13/2013
Exists online : False
Views : 657