To resolve the error of User Profile Service failed the logon in the Windows Safe Mode, boot up your computer, press F8 (or hold Shift + restart) in order to get to the Safe Mode, log on to Registry Editor, browse to the following key: HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion ProfileList, and delete the corrupted profile, give the right name to entries in .bak, and restart your computer.