How do I migrate profile settings or clean the profile registry keys?

Albert Rees 20 Reputation points
2025-10-01T14:59:47.8+00:00

I recently posted that my Win 11 (v24H2) search is no longer working. This includes the "Search" embedded in the taskbar, and the searches in Win 11 "Start". I have tried no less than 5 suggested solutions including the indexing and a v24H2 repair install. When all have completed, I still see a black box with a blue bar at the top running left to right. Typing in an application name and hitting enter also does nothing.

Shortly after that post, Kimberly Olano suggested that I determine whether the problem is user profile specific (thanks Kimberly!) and doing as she suggested, I determined that it is. Knowing that, Kimberly said that the search problem is tied to my profile, it can be corrected by migrating settings or cleaning the profile registry keys, but Kimberly did not describe how to do either.

Windows for home | Windows 11 | Performance and system failures
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Jhun Buala 1,860 Reputation points Independent Advisor
    2025-10-01T16:56:09.4666667+00:00

    Hi Albert Rees,

    Hope your day is fine. Sorry to hear about your problem. Since your problem is a Profile base issue, try to do these recommended steps below.

    First, as a more recommended and safest option, create a new user profile first and migrate your settings first. To do this:

    Go to Settings > Accounts > Family & otherusers > Add account > "I dont have this person's sign-in information" > Add a local account.
    Sign-in to the new account (Windows will create the new profile folder)

    From an Admin account copy your data "EXCEPT"

    Ntuser.dat

    Ntuser.dat.log

    Ntuser.ini

    Copy profile folders except these NTUSER files.

    Example, run in an elevated Admin PowerShell or Command Prompt. > replace <OldUser> and <NewUser>.

    robocopy "C:\Users<OldUser>\Desktop" "C:\Users<NewUser>\Desktop" /E /COPY:DAT

    robocopy "C:\Users<OldUser>\Documents" "C:\Users<NewUser>\Documents" /E /COPY:DAT

    robocopy "C:\Users<OldUser>\Pictures" "C:\Users<NewUser>\Pictures" /E /COPY:DAT

    robocopy "C:\Users<OldUser>\AppData\Roaming" "C:\Users<NewUser>\AppData\Roaming" /E /COPY:DAT

    DON'T COPY: C:\Users<OldUser>\ntuser.dat. Some Apps Store per-user state in AppData\Local ; copy only what you need from Local (large caches and search packages are better regenerated). Then Reset Permissions on the new profile folder:

    icacls "C:\Users<NewUser>" /reset /T

    Then sign in as the new user and test the search.

    Next Option is to Edit or Clean the broken profile's registry keys (Advance option - If you want to retain your existing user and just want to fix it). Use or Sign-in to a different admin acount to do these following steps (dont use your broken account).

    First, back-up your NTUSER.DAT file. Copy it from C:\Users<OldUser>\NTUSER.DAT to a different folder or save path. Export Profile list (just to be sure). On CMD:

    reg export "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" C:\Temp\ProfileList.reg

    Create a System restore point: Control Panel > Recovery > Open System restore > Create.

    Second, Log-in to a different Admin Account (dont use the broken account)

    Third, Load the broken user hive, replace <OldUser> and choose a name BadHive.

    Sample: reg load HKU\BadHive "C:\Users<OldUser>\NTUSER.DAT"

    Fourth, Delete the per-user Search key (resets per-user Search/Cortana state).

    reg delete "HKU\BadHive\Software\Microsoft\Windows\CurrentVersion\Search" /f

    You can try also to use regedit: expand

    HKEY_USERS\BadHive\Software\Microsoft\Windows\CurrentVersion\Search and delete the Search key.

    Fifth, delete the search package folder on the broken User account to force package data to regenerate.

    rd /s /q "C:\Users<OldUser>\AppData\Local\Packages\Microsoft.Windows.Search_cw5n1h2txyewy"

    If folder name is different, try to check *C:\Users<OldUser>\AppData\Local\Packages* for "Search" packages. It is recommended removing that folder when regenerating the per-user Search package.

    Sixth, unload the hive and reboot.

    reg unload HKU\BadHive

    shutdown /r /t 5

    Seventh, log-in again on the fixed User account and test the Search. Incase it still fails, try the ResetWindowsSearchBox.ps1 and re-register the Search system app. On elevated PowerShell:

    # re-register the Windows Search system app (use non-elevated for user registration if possible)

    Get-AppxPackage -AllUsers Microsoft.Windows.Search | ForEach-Object {

    Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"

    (Note the guidance about running registration from the proper account context-see Microsoft guidance).

    Third Option, is to remove the entire old profile and let windows recreates a fresh profile (NOTE: back-up first the user's data).

    First step, Export Profile list (back-up process). On CMD:

    reg export "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" C:\Temp\ProfileList.reg

    Second, in Regedit (Registry Editor), go to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    Find the SID whose ProfileImagePath = C:\Users<OldUser>, delete SID key.

    Third, delete or just rename the folder C:\Users<OldUser> (after you back-up the needed data).

    Finally, sign-in in that fixed user account. Windows will create a fresh profile folder.

    I hope some of the steps above solved your issue.

    Sincerely,

    Jhun


  2. Jhun Buala 1,860 Reputation points Independent Advisor
    2025-10-03T15:20:50.3266667+00:00

    Hi Albert,

    Happy to have a reply from you. Im sorry I think I confused you a bit. After you created your new Admin User Account all you have to do is just to copy your data from your Old User Account (defective one). We're not going to copy the whole profile.
    These command syntaxes are just my sample, for much easier way to transfer your data. You can still choose the data / files you want to transfer from your old user account to the newly created one.

    To summarize everything:

    Copy your data like Photos, Documents, Downloads, Desktop, etc.

    Do not copy: NTUSER.INI, NTUSER.DAT, registry hives, and large caches in AppData\Local. <these files are what we suspect that makes your search configuration broken.

    Regards,

    Jhun


  3. Jhun Buala 1,860 Reputation points Independent Advisor
    2025-10-05T15:54:21.95+00:00

    Hi Albert,

    Yes, as long as it is an Admin type account you can do the transfer. But to be sure, use your new Admin account.

    Have a nice day.

    Sincerely,

    Jhun

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.