sn00x, to get into the registry, go to Run... and type regedit
In the registry (XP) your CD key info is under: My Computer\HKLM\SOFTWARE\Electronic Arts\EA Games\Battlefield 2\ergc
But I wouldn't trust cutting and pasting it.
Right-click on the ergc folder and choose Export, then save it (it'll create a small 'Registration Entries' file). After you've reinstalled BF2, just double click that file and it'll write itself into the reg.
Remember to get that info out of the reg BEFORE you uninstall it or it's gone forever.