PDA

View Full Version : CD Key General Help Thread


SaladFork
07-10-2005, 10:46 PM
If for any reason you threw away your manual, and are afraid to uninstall the game since you no longer know what your CDKey is, fear no more. The following program will tell you what your CDKey is. However, isntead of uploading it, I'll give you the pleasure of making it!

Open up notepad, and paste the following into it:
@echo off
goto a
Option Explicit
Dim WSHShell, RegKey, ScreenSaver
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKCU\Control Panel\Desktop\"
ScreenSaver = WSHShell.RegRead(RegKey & "SCRNSAVE.EXE")
WScript.echo "Screen Saver: " & ScreenSaver
use Win32::Registry;
$p = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
$main::HKEY_LOCAL_MACHINE->Open($p, $CurrVer) ||
die "Open: $!";
$CurrVer->GetValues(\%vals);
foreach $k (keys %vals) {
$key = $vals{$k};
print "$$key[0] = $$key[2]\n";
}
goto b
:a
regedit /e "Your BF2 CDKey" "HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Games\Battlefield 2\ergc" | find "@="
find "@=" "Your BF2 CDKey"
del "Your BF2 CDKey"
pause
goto end
:b
foreach $k (keys %vals) {
$key = $vals{$k};
print "$$key[0] = $$key[2]\n";
}
:end

All done? Now save this as "cdkey.bat" (with the quotes so it's not a .txt file) to any folder that you can remember (desktop works great).

Now just run the .bat. Viola!

~Salad

Gunny Highway
12-12-2005, 01:39 PM
Symptom. You get Invalid CD key error when trying to join server in BF2 or in BF2:SF.

EA has posted a fix to the issue, that doesn't include using BF2CDKeyCheck and other tools, so other workarounds shouldn't be needed now.

There are some errors in the post at EA however, I think, but I used their Ask a Question option at their support to let them know about it. I used this approch when changing Windows account (although the article mentions that it isn't meant for fixing this ;))The way I used below is marked in O R A N G E. Try the option in O R A N G E if the first option fails.

If you get the Invalid CD Key error, then try this.

http://support.ea.com/cgi-bin/ea.cfg/php/enduser/std_adp.php?p_faqid=10959&p_created=1128535424&p_sid=ycTjiIWh&p_lva=8986&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX 3Jvd19jbnQ9NTcmcF9wcm9kcz03LDEzODgsMTM4OSZwX2NhdHM 9MCZwX3B2PTMuMTM4OSZwX2N2PSZwX3NlYXJjaF90eXBlPWFuc 3dlcnMuc2VhcmNoX25sJnBfcGFnZT0x&p_li=&p_topview=1

Question
'Invalid CD key' error after installing the patch.

Answer
Sometimes a conflict in the updated files can prevent the game from properly identifying your CD-key. Usually, refreshing your CD-key will resolve the issue. Note that this will only correct the error if you used the same Windows account to install, patch, and troubleshoot the game. If you have switched Windows accounts at any point it is recommended you uninstall, reinstall, and repatch using the same Windows login.

If you have Battlefield 2

Click Start.
Go to Run.
Type regedit and hit OK button.
Click on plus sign next to HKEY_LOCAL_MACHINE.
Click on plus sign next to SOFTWARE.
Double click on Electronic Arts folder.
Double click on EA Games folder.
Double click on Battlefield 2 folder.
Double click on ergc folder.
Data displayed will probably have x9392 only.
Right click on it and select Modify.
Type in x9392 and then your CD key.
note: don’t include hyphens.

Example: x9392(your Battlefield 2 CD key here)

If you have Battlefield 2: Special Forces

Click Start.
Go to Run.
Type regedit and hit OK button.
Click on plus sign next to HKEY_LOCAL_MACHINE.
Click on plus sign next to SOFTWARE.
Double click on Electronic Arts folder.
Double click on EA Games folder.
Double click on Battlefield 2 folder.
Double click on ergc folder.
Data displayed will probably have x9392 only.
Right click on it and select Modify.
Type in x9392 and then your Battlefield 2 CD key.
note: don’t include hyphens.
Double click on Battlefield 2 Special Forces folder.
Double click on ergc folder.
Data displayed will probably have x9392 only.
Right click on it and select Modify.
Type in x9392 and then your Battlefield 2 CD key.
note: don’t include hyphens.
note: do not use your Battlefield 2: Special Forces CD key.

Example: x9392(your Battlefield 2 CD key here)

ALTERNATIVE METHOD THAT WORKED FOR ME!! TRY THIS IF THE WAY EA EXPLAINS IT DOESN'T WORK:
Type in x9392 and then your Battlefield 2: Special Forces CD key. ***
note: don’t include hyphens.
note: do not use your Battlefield 2 CD key. ***

Example: x9392(your Battlefield 2: Special Forces CD key here)

** Make sure to type letters in the cd-key in capitals, or it will not work, e.g. x9392AB12CD34EF56GH78, where your CD key is AB12CD34EF56GH78 **

1. If the issue persists, you will need to uninstall the game completely and then reinstall and repatch to completely remove and replace corrupted files.


If the above mentioned doesn't work, try updating PB or manually uninstall BF2 and if you have BF2:SF, uninstall that aswell.

How to update PB:
http://www.evenbalance.com/index.php?page=pbsetup.php
and
http://www.evenbalance.com/downloads/bf2/pbsec.htm

How to manually uninstall BF2 only:
http://support.ea.com/cgi-bin/ea.cfg/php/enduser/std_adp.php?p_faqid=8986&p_created=1119312427

How to manually uninstall BF2 and BF2:SF:
http://support.ea.com/cgi-bin/ea.cfg/php/enduser/std_adp.php?p_faqid=11150&p_created=1132789004&p_sid=di8jMKWh&p_lva=10959&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX 3Jvd19jbnQ9NTcmcF9wcm9kcz03LDEzODgsMTM4OSZwX2NhdHM 9MCZwX3B2PTMuMTM4OSZwX2N2PSZwX3NlYXJjaF90eXBlPWFuc 3dlcnMuc2VhcmNoX25sJnBfcGFnZT0y&p_li=&p_topview=1


How to find your BF2:SF CD key if you have the EA Downloadable version.

Method 1
If you have the EA Downloadable version of BF2:SF then your BF2:SF CD-key is listed at the entry regkey = in the file: eagamesbf2-2006online_contentbf2-ep1.eam in the EA Downloader folder: C:\Program Files\Electronic Arts\EA Downloader\cache\YOUR-EA-DOWNLOADER-LOGIN\ Open the file in notepad.

Method 2
Alternatively running Battlefield 2 Special Forces_code.exe in this folder: C:\Program Files\EA GAMES\Battlefield 2\SupportXP1\ will automatically insert your BF2:SF CD-key into the ergc folder for BF2:SF mentioned above, and you just have to add the x9392 in the correct ergc location in 17. above.

(Battlefield 2_code.exe in regular support folder does the same, but for BF2, just not automatically.)