Error 0x8007001F Installing Feature Update or Cumulative Update

When you attempt to install a feature update such as Windows 11 22H2, the error 0x8007001F may occur. The error code 0x8007001F (“ERROR_GEN_FAILURE”) means “A device attached to the system is not functioning.”

0x8007001f setup error

The Setupact.log (collected using SetupDiag) contained these significant lines:

(The lines containing the phrase “Found valid profile but can’t get user credentials” is the key.)

Warning    [0x0803ba] MIG    Found valid profile but can't get user credentials. User SID: S-1-5-21-850299350-1452774405-4938938-1003. Error: 0x00000534[gle=0x000000cb]
Warning    [0x0809c0] MIG    Incomplete user profile detected and ignored:C:\Users\HP. Error: 2. Subsequent missing profiles will be immediately ignored.
Info       [0x0803e5] MIG    Not unmapping HKCU\Software\Classes; it is not mapped
Info       [0x0803e5] MIG    Not unmapping HKCU; it is not mapped
Warning    [0x0803ba] MIG    Found valid profile but can't get user credentials. User SID: S-1-5-21-850299350-1452774405-4938938-1001. Error: 0x00000534[gle=0x000000cb]
Info                  MIG    Attempting to add direct mapping for HKCU to 0x80000003, S-1-5-21-850299350-1452774405-4938938-1008
Info       [0x0803df] MIG    Adding direct mapping from HKCU to HKEY_USERS\S-1-5-21-850299350-1452774405-4938938-1008 (R/W)
Info       [0x0803b8] MIG    Processing profile: C:\Users\kokoe
Info                  MIG    UserIsAdminCheck: HP\kokoe IsAdmin = TRUE
Info                  MIG    UserIsConnectedCheck: HP\kokoe IsConnected = TRUE
Warning               MIG    Duplicate profile detected for user S-1-5-21-850299350-1452774405-4938938-1008(C:\Users\kokoe) vs. S-1-5-21-850299350-1452774405-4938938-1001(C:\Users\kokoe).
Info                  MIG    AdjustPrivilege: Privilege SeTakeOwnershipPrivilege will be Disabled
Info                  MIG    Privilege has been disabled
Error                        MigPlatformStartupOnline caught exception: Win32Exception: Duplicate profile detected for S-1-5-21-850299350-1452774405-4938938-1008. Abandoning.: The specified user does not have a valid profile. [0x000004E5] class Mig::CUserContext *__cdecl Mig::COnlineWinNTPlatform::AddUserContext(class Mig::CRegistryDataStore *,class UnBCL::String *,class UnBCL::String *,class UnBCL::String *,class UnBCL::String *,class UnBCL::String *,class UnBCL::Array *,int,struct _FILETIME,int,int,int,class UnBCL::String *,class UnBCL::String *)
Error                 SP     pSPDoMainGather: Engine initialization failed with error: 0x00000004
Info                  SP     SPExecuteGather: End run. Result: 0x00000004
Error                 SP     CGatherData: Migration phase failed. Status: 4
Info                  SP     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Error                 SP     Operation failed: Gather data, scope: EVERYTHING. Error: 0x8007001F[gle=0x000000b7]

As you can see above, two user profiles seem to be invalid, and their SIDs (as per the log file) are given below:

  • S-1-5-21-850299350-1452774405-4938938-1001
  • S-1-5-21-850299350-1452774405-4938938-1003

Running the whoami /user command showed this:

User Name SID
========= ==========================================
hp\kokoe S-1-5-21-850299350-1452774405-4938938-1008

So, it’s clear that the SID S-1-5-21-850299350-1452774405-4938938-1008 is a valid and functioning profile that should NOT be deleted.

The other two SIDs are invalid. Deleting the invalid SIDs from the registry should fix the error 0x8007001F.



Resolution

To fix the error 0x8007001F when installing an update, delete the two invalid SIDs mentioned in the log file. First, create a System Restore Point and complete the following steps.

Note: The following SIDs were mentioned in the log from the subject computer. The SIDs will be different on each system. The following solution is based on the findings from the setupact.log above. Adapt the following solution accordingly to your situation.

  1. Launch the Registry Editor by running regedit.exe
  2. Go to the following branch:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
  3. Backup the branch to a REG file.
  4. Expand the ProfileList key.
  5. Right-click subkey “S-1-5-21-850299350-1452774405-4938938-1001” and choose Delete.
  6. Right-click subkey “S-1-5-21-850299350-1452774405-4938938-1003” and choose Delete.
  7. Exit the Registry Editor.

See if you’re able to install the update(s) now.

Note: Microsoft forums user Zaki experienced the above issue. After deleting the erroneous SIDs from the registry, the problem was resolved.


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment