Long time no see my friend!
I tried to reproduce your problem through three different laptop devices.
Of the three laptops, two Windows 11 one Windows 10. the Windows 10 one is my personal computer, so I've been working on this issue in my free time as well.
Thank you very much for the details provided in your reply and I will answer your query in a top to bottom manner.
First is the picture and informations you provided with the mention in your last reply.
(1) When granting administrator privileges to a local account, the error “error 5 has occurred” usually indicates that access has been denied, which means that there are no privileges or access to the relevant system resources that caused the problem.
(2) This also corresponds to the image you provided, which shows a similar Account Unknown account. This could be because the account has been deleted, never created, or is not visible in the network environment.
(3) In this case, it is possible that something in the registry has been accidentally changed.
Unfortunately I can't seem to open your video at the moment due to internet reasons, but I've gotten a general insight into your situation through text messages.
I've been testing it for the past two days and will offer you some other solutions that you can try first, but since I'm on a different computer environment than you are whether or not it works depends on your computer environment. If the problem persists after you try it, you may need to solve the problem by making Windows installation media.
Option 1: Do you have a habit of backing up your registry on a regular basis, or do you back up your registry before you open it to try to modify or view it? Because if you have a backup, you can try to restore it.
Please note: If you have another Windows 10 device, you can also try to restore the registry by exporting the registry of another Windows 10 device and then importing it to the problem device. In most cases this will fix the problem, but some of the changes you have made will be overwritten.
Option 2: You can try to scan and repair the system via command line, in my personal computer, when I try to modify the registry intentionally and repair it, sometimes it will work and sometimes it won't work. But it should still depend on the size of the problem.
Click “Windows Logo Key” to open the search bar -> Type “cmd” in the search bar and open it with administrator privileges -> Please enter the following commands
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /RestoreHealth
SFC /Scannow
Please note: The above commands may need to be repeated 4-5 times to scan for problems, especially with SFC.
Option 3: I have been writing different .reg files to try to reset the registry. I ended up writing and keeping only one way to reset registry permissions that you can try to use.
But please note: Make sure you backup the registry when you make this change!
(1) Open Notepad
(2) Copy the following text that I edited into Notepad
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\.]
[-HKEY_CLASSES_ROOT\Drive]
[-HKEY_CLASSES_ROOT\Directory]
(3) Change the file extension to “.reg”
Double click and run the file. (This may also depend on the situation, some devices may not be compatible, resulting in failure to run)
Option 4: If you have a restore point on your computer, you can try to restore your system to a point before the problem occurred.
A restore point will only remove new applications, drivers, and Windows updates that were installed after the point in time of the restore point, and will not affect your personal files.
I think this way is a bit easier and more convenient than making Windows installation media.
You may refer to: Use System Restore - Microsoft Support.
If the problem still exists after you try the above solution, you can perform it by making Windows installation media, which is the way I have used in my personal testing. However, I personally recommend that you upload your data to a cloud drive or backup it via an external storage device to avoid accidental data loss!
I sincerely hope that my efforts, which have taken a great deal of time, have been successful in helping you!
Looking forward to your good news my friend!
Best Regards
Arthur Sheng | Microsoft Community Support Specialist