I assume this will work for other versions of Windows - at least Vista, 7, 8 and 10. I did this on W8.1. Sorry if anything is unclear. It's late and I'm tired, so feel free to ask questions.
STEP 1: Make a bootable USB flashdrive/CD/DVD
Do this on a separate computer. In case it's not obvious, you'll need to use that computer (which is not malware-infected) to create the bootable drive (or disc), preferably a flash disk as it's not always possible to boot a USB hard drive.
In order to get access to your password, you need access to the command prompt. But, to do that, you either need a password reset drive/disc made within Windows (oops, I bet most people don't even know they can make one!), you need a bootable drive with a 3rd party password recovery/reset program, or a bootable USB drive. Not having the former, and not knowing which 3rd-party apps are trustworthy, I chose the third option. You could also create a bootable CD/DVD, but this wasn't an option for me.
The reason for the bootable device/disc is that you cannot access the command prompt in the Troubleshooting>Advanced options screen - accessing it normally (via the repair menu) will just result in you banging your head because you don't have the password for the account *unless you have access to a different account on the same computer, in which case you can jump to STEP 4 and skip STEP 5.*
Microsoft supplies the instructions to create the WPE bootable USB drive/CD/DVD (do it all, including downloading and installing the ADK), then go to the next step below.
STEP 2: CHANGE YOUR BIOS SETTINGS
Note: Unfortunately the MS article above (which is no longer maintained) said nothing about changing from UEFI to CSM for your boot drive, disabling secure boot, or even disabling USB 3.0 (although it does suggest avoiding USB 3.0 ports) - but you may not have to do all three. I had to fiddle with it - the first time I turned off all three, it didn't work, but after turning them on and off, I was able to get my flash disk to boot up.
NOTE: You'll need to get into BIOS (your system settings) to turn those 3 things off. You'll also need to change your boot order to USB first or, if your system allows it, select which device to boot from just once (e.g.: on a Toshiba Satellite, you press f12 and it allows you to choose which device, enter setup (BIOS), or even recovery).
STEP 3: BOOT THE USB DRIVE/CD/DVD
Once you've got your system set to boot from your USB drive, insert it and boot up to it. From there, Windows PE should load right into the command prompt, which allows you to create the temporary access point explained below.
STEP 4: CREATE AN ACCESS POINT
One choice is to replace utilman.exe (Ease of Access). http://pcsupport.about.com/od/windows-8/a/reset-password-windows-8.htm (steps 1-4 only)
An alternative to the copying of utilman to C: would be to just rename utilman.exe to utilmanold.exe or something else ("rename utilman.exe utilmanold.exe"), then copy cmd.exe as utilman.exe ("copy cmd.exe utilman.exe"). I think this is easier. Later (after changing your password!), do NOT forget to change things back!
STEP 5: CHANGE YOUR BIOS SETTINGS BACK TO NORMAL
Once you're done close the command prompt and pull your flash drive out (actually, once the command prompt appears, you can remove your USB drive). Your system should reboot, and then you'll need to get back into your BIOS (pre-Windows basic system settings), which varies depending on the maker of your computer. Turn USB 3.0 on, UEFI, too, and then you can turn on secure boot after that (it's dependent on UEFI), and change your boot drive back to your normal setting (your C: drive/main hard drive).
STEP 6: REBOOT
Restart your computer so that your real Windows loads to the login screen.
STEP 7: ENTER THE COMMAND PROMPT
Once you're at the login screen, you click on the Ease of Access icon, which will open the command prompt you prepared in STEP 4.
NOTE: If you never turned off Sticky Keys in your control panel, then you could have chosen Sticky Keys as your temporary access point. You'll have changed that file in STEP 4, with the filename being "sethc.exe" instead. Press shift 5 times at the login to enter the command prompt.
STEP 8: CHANGE YOUR PASSWORD
http://pcsupport.about.com/od/windows-8/a/reset-password-windows-8.htm (steps 7-8 only)
STEP 9: LOG IN WITH YOUR NEW PASSWORD
STEP 10: OPEN THE COMMAND PROMPT IN ADMINISTRATOR MODE
How you do this varies depending on which version you use. It may be from the search programs and files box in the startup menu in W7 (type "cmd"), or by clicking on the search icon in the start menu of W8 (type "cmd"), or something else (like using the run box in older version in administrator mode). You'll then need to right click on the program and left click on "run as administrator" - if you do not, you will be unable to complete the next step!
STEP 11: GET RID OF THE TEMPORARY ACCESS POINT (EASE OF ACCESS OR STICKY KEYS)
Either http://pcsupport.about.com/od/windows-8/a/reset-password-windows-8.htm (step 11 only). Don't forget to change "sethc.exe" if that is what you used before instead of "utilman.exe"!
or (do not do both the above and the below! Do what matches what you did in STEP 4.)
Once it is open, move to the correct directory - type: "cd c:\windows\system32". It should change the directory shown in the prompt.
Get rid of the command prompt file - type: "del utilman.exe" or "del sethc.exe" depending on which you used.
Rename the real file (utilman.exe or sethc.exe)" ren utilmanold.exe utilman.exe" or "ren sethcold.exe sethc.exe" depending on which you used. If it doesn't let you, like it didn't on my laptop, then replace "ren" with "copy".
Close the command prompt.
STEP 12: MAKE A PASSWORD RESET FLASHDISK
Get a USB flashdisk you have no use for (but it must still function!). It doesn't have to be very big. Keep it in a safe place so that when you forget your password again, you'll be able to reset it more easily than this.
I hope that this information is clear enough and helpful to others who have lost their password.
NOTE ABOUT ACCESSING ADVANCED OPTIONS: A faster way to access the Advanced Options screen is by holding down shift while choosing restart from the Windows login screen. This is actually faster than pressing f8 to access the repair menu first, at least on my laptop.