- 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.
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
- 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>
- 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.
- Select the HKEY_LOCAL_MACHINE key, and then click Load Hive on File menu.
- 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.
- In the Registry Editor winodw, locate the following subkey : HKEY_LOCAL_MACHINE\test\Microsoft\Windows NT\Current Version\ProfileList
- 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.
- In Control Panel, click System to open the System Properties item.
- Click Advanced system settings to open the System Properties screen.
- On the Advanced tab, under User Profiles, click Settings.
- 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 2Run the following WMI command to delete the User profile:
wmic /node:"localhost" path win32_UserProfile where LocalPath="c:\\users\\user1" Delete
Article ID: 2530664 - Last Review: May 13, 2013 - Revision: 1