If you "uninstalled" the game by deleting the game folder, you need to manually delete the Registry values, in order to install the game again.
or try this (which may blow up your PC Registry if you do it wrong)
Press [WINDOWSKEY] + [R], the "Run..." dialog will open
Type regedit and press [RETURN] or click on OK
Inside the "Registry Editor", navigate to the appropriate "folder", according to your OS's architecture:
For 32bit Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\Electronic Arts\EA Games\Battlefield Play4Free
For 64bit Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Electronic Arts\EA Games\Battlefield Play4Free
Delete the Battlefield Play4Free "folder".
Try to install again. If it doesn't work, you need to restart your PC, since some registry changes are only applied