It is not possible to recover a forgotten Windows 7 password. However, you can reset it using either a Windows 7 installation disk or a Windows 7 System Repair disk.
To start off the resetting process, insert either the Windows 7 installation DVD or the Windows 7 System Repair disk into the computer's optical drive, then boot from it. You can also boot from a USB device if it's your preference. After the computer boots from the disk or USB device, click on Next. If you are using a Windows 7 installation disk, click on the Repair your computer link. Wait for a moment while your Windows 7 installation is located on your computer.
When the installation is found, take note of the drive letter of the disk with the installation. From the Operating System list, select Windows 7 and then click on Next. On the window with System Recovery options, select Command Prompt. Once the command prompt window is open, enter the commands "copy d:windowssystem32utilman.exe d:"" and "copy d:windowssystem32cmd.exe d:windowssystem32utilman.exe" in that order. When the Overwrite prompt appears, answer with Yes. Remove the disk or USB device, and restart your computer.
At the Logon screen, click on the command prompt icon that appears at the bottom-left of the screen. Once the window is open, execute a command with the format "net user myusername mypassword", substituting "myusername" with your user name and "mypassword" with the new password. Close the command prompt window, and use the new password to access your account.