# Problems with playing Battlefield 2 where “My Documents” are not in the default location

I am having a problem with Battlefield 2 in where I receive a error popup on game start (after the intro menus):

LOCERROR_Unable to open current profile.

I think this is down to the fact my documents area is stored on my home server, instead of the C:\Users\%username%\Battlefield 2 expected location. If I start the game on a local (i.e no network documents) account I can start and play the game fine, creating a local account. I can then copy the "Battlefield 2" folder created in that accounts documents and place it in My Documents which removes the error show above, but when I try to start a mulitplayer or singleplayer game the game crashes with a black screen back to the desktop.

It seems to be a fairly common problem and I have found many references in EA and other forums, although no definitive answer (and the appearance of the evil "I found what the problem was but I'm not going to post it here").

Is there a way, using symlinks or junction points in Windows 7 to get this to work? I've thought about manually creating a "My Documents" Folder on the C:\ drive but am unsure if this will work.

Game Info: Battlefield 2, Updated to 1.50. No Mods, although Sandbox had the same problem. The computer is more than capable of running the game.

I've checked the registry settings and while there is a "InstallDir" entry which points to the correct place there are no settings that detail a user profile. As an interesting note, it's possible to copy your Battlefield 2 folder to a USB/Portable Hard disk and run it from that (although it's slow to start up initially).

Using a network share or drive mappings makes no difference (eg \filesvr\tom$\My Docs or N:\My Docs). Even changing it to a different partition on the same computers disk gives grief. There is a folder created in the Battlefield 2 root directory with the name of my file server and some profile settings created in that. After a clean install of Windows 7 onto a spare machine over the weekend and using the excellent Everything search tool I have found that profile details have also been saved in: C:\Users\[username]\AppData\Local\VirtualStore\Program Files\EA Games\Battlefield 2\[fileserver]\userstore$\[username]

...so I'll try poking around with these files and symlinking/robocopying them to where they should be. Hopefully the end is in sight.

From this thread it seems you have a few options you could try:

1. Redirect My Documents so it points to your homeserver using its IP-address like this: \\192.168.0.252\Data\Documents. In the BF2 folder there should now be a profile using the IP-address above. Note that BF2 can only read this info, it will not write it to dics. So you will need to edit the files by hand.

2. Redirect My Documents to something with 1 or more subfolders, which means a simple redirect to H:\ would not be enough. In the example My Documents is pointing to "H:\Documents and Settings\<username>\My Documents".

Try to run the game under compatibility mode for Windows XP Service Pack 2. Windows 7 will make sure that program accesses to "My Documents" get properly translated to their new locations.

• I was already running it under "XPSP3" Compatability and setting it to XPSP2 lead it to crashing after clicking "Start Singleplayer" in the bottom right rather the the "Singleplayer" button along the top (so a little bit further than before"). – tombull89 Jun 29 '11 at 13:46
• You're launching the game as an administrator, correct? – Neil Jun 29 '11 at 14:35
• correct. Be it right-click and "Run as Administrator" or set as "Run this program as administrator" in the compatability tab the same thing happens. – tombull89 Jun 29 '11 at 15:01

What method did you use to move the My Documents folder? I suspect whatever you've done here has upset the game (which we can assume is a fault, it probably uses some incorrect method to find the MyDocs folder...).

Anyway, if in doubt a directory symlink should let you trick BF2 in to thinking the data is in the expected place, while at the same time not having to move or reconfigure anything else.

From an elevated cmd instance try:

mklink /D "C:\Users\<un>\My Documents\Battlefield 2" "X:\path\to\real\dir"

Or whatever the path to the BF2 folder should be according to the game (checking this with a local-only profile might be handy).

You will probably have to create the parent directories before you can create the symlink folder if they don't exist (ie, create C:\Users\<un>\My Documents\ first).

• I've tried both Drive Mapping and GPO from the server. As mentioned in chat I'll give it a go. – tombull89 Jun 30 '11 at 11:15
• Still no luck. I'm going to try on a clean (VM) install. – tombull89 Jul 1 '11 at 14:29

The fact that windows uses VirtualStore to redirect the folder indicates a security issue with the real folder. From the path it looks like BF2 tries to use C:\Program Files\EA Games\Battlefield 2\[fileserver]\userstore$\[username] which is either caused by BF2 incompatibiliy with networked paths (the two backslashes from the start of \\[fileserver]\userstore$\[username] are somehow dropped) or misconfiguration of the my documents/user profile redirection (less likely). You could try mapping a drive to \\[fileserver]\userstore$\ and redirecting the my documents folder/user profile using the drive letter or create a junction point at C:\Program Files\EA Games\Battlefield 2\[fileserver]\userstore$\[username].