There can be some causes to this error, The common reason is permission or Default user profile ntuser.dat file missing or corrupted. This is the error screen you might get
Make sure all is well with the directory C:\Users\Default
. the permission should be inherited . and look like this :
Next, make sure you have a valid Default profile . there is a file which act as hive in the registry when a user log on : NTUSER.DAT . If this file is missing or corrupted the user profile service logs an event with ID 1508 and source User Profile Service
in the application event log.
Windows was unable to load the registry. This problem is often caused by insufficient memory or insufficient security rights.
DETAIL - The system has attempted to load or restore a file into the registry, but the specified file is not in a registry file format.
for C:\Users\username\ntuser.dat
You can just copy this file from a healthy system or replace the content of C:\Users\Default
all together from a healthy system !