It’s the one of the worst things you can do, and it makes you feel like a complete idiot. You forgot the password for the Administrator account of your Windows system. If you’ve just finished the install, check for an innocent mistake before you jump out the window or reinstall—enter the password in uppercase in case the Caps Lock key was on when you created the Administrator account.
Didn’t do it? Hopefully you have another account that is a member of the Administrator’s group. If so, just log on with that account and change the Administrator password. If that doesn’t do the trick and you can afford to lose any other accounts contained on the system (likely with a workstation but unlikely on most servers), delete the SAM hive. On a FAT system, boot the computer with an old DOS or Windows 9x boot disk and delete the %systemroot%\System32\Config\SAM file (or rename it). On an NTFS system, you can use the Recovery Console to access and delete the file, but only if you have configured the Recovery Console for automatic administrative logon through the local security policy or through the inherited domain security policy.
Another option is to back up the system, reinstall Windows, and then restore the system. As when deleting the SAM, you’ll lose your accounts, but at least you’ll have the system back with all your other settings intact. And if you absolutely don’t want to lose your accounts, check out http://www.winternals.com/ for utilities that will enable you to reset the administrator password.