If you've suddenly found yourself locked out of your account, either due to corruption or forgotten password, here's how you can handle it.
If you use a Microsoft account to login, this is by far the easiest method. Go to https://account.microsoft.com/ on a different device. You can reset your password there. Make sure the computer is connected to the internet after the password is reset.
If you use a local account you can use Linux, a third party tool or a Windows USB install. Here are some links to Linux methods and third party tools:
If you can't login because your profile is corrupt or you have forgotten your password and do not want to use Linux or third party tools, you can use the Recovery Tools command:
list volume - Find your Windows volume.
select volume # - Replace # with the target Windows volume.
assign letter=W - If no letter, assign it one.
copy X:\Windows\System32\Utilman.exe X:\Utilman.exe
copy X:\Windows\System32\cmd.exe X:\Windows\System32\Utilman.exe
Once Windows is booted, click the Ease of Access icon in the bottom right. This will open Command.
Do one of the following:
Disable forgotten password:
net user yourname /passwordreq:no
Clear forgotten password:
net user yourname ""
net user administrator /active:yes
You should now be able to login to any of the accounts. If you do not see the admin account, restart.
Put Utilman back:
copy X:\Utilman.exe X:\Windows\System32\Utilman.exe
This method does not work if your file system is encrypted out your control or is RAW due to the use of Intel Rapid Storage. Later versions of Windows appear to have closed this loophole. YMMV.