Hi all,
So today I was faced with the unthinkable - I somehow mistyped my password when I was wanting to change it and somehow must've made the same mistake twice when locking in a password over 26+ characters.
Spent a good while attempting to re-crack it by testing capslock, double letters, double numbers, transposed letters, etc. without luck.
So depending on how many transactions you've made, here are my thoughts:
1. The Wiki bit on "Recovery" is a good first step. Go into your directory (C:\Users\Username\AppData\Roaming\Bitcoin and find the wallet.dat. Back that up. Drop in a previously backed up wallet (you've been backing them up, right?). Delete the blk##.dat files and index and allow the client to redownload the entire thing. Given minimal use, you might be able to restore all your coins from a semi-recent file.
2. Since #1 did not work for me, I also gave it a go and looked for other ways to restore my wallet. Found the rarely-used right-click "Restore Previous Versions" in Windows Explorer. Mine had 3 backups - yesterday, a couple days ago, and last week. If you restore one, it will not wipe out the dialogue's other versions, just FYI. Again, make sure your current wallet that has all the coins is zipped or in a different folder. Close the client and overwrite the *.dat. Test your password.
In this case, I had to go to my very last backup (before I knew I had overwritten my password wrongly since I caught it within a day or so). Sure enough, all my coins were intact and the proper secure password that worked for me did indeed unlock the wallet
3. I suppose it could be brute-forced or password cracked but I've found no tools to do this to a *.dat file as opposed to zips or other regular files.
4. If your wallet has lots of transactions and you've gone over 100, I'm also not sure how well the two options short of figuring out your mistaken password could be done without losing any of the coins.
I did look at Armory but I don't believe that can outright recover a password. Just thought I'd mention that in this case, I must've goofed so badly (TWICE...argh!) that trying restoring the file via Windows itself could help. It's an extra step to try when you feel out of luck and worried.
As long as you take the current wallet.dat (presumably that has all your coins in it) and back it up or move it, you can test freely with older copies or backup dats and don't have to worry about overwriting the good file!