HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Electronic Arts\EA Games\Battlefield 2\ergc
This contains your CD-key info, but it's not your actual CD-key. It gets converted into a serial number about 100 characters long. That's why simply typing your key in doesn't do anything.
Go into your EA Games\Battlefield 2\Support, open Battlefield 2_code.exe and try re-entering your key there.