See the question and my original answer on StackOverflow

Microsoft Knowledge Base here http://support.microsoft.com/kb/974247/en-us says this:

At any given point of time, the correct state of a 64-bit computer, for SQL Server Compact, would be the following: Both x86 and amd64 MSIs are installed. Both x86 and amd64 MSIs are of the same version.

Therefore, if you face any similar issues, make sure that the computer has both x86 and amd64 MSIs of Compact are installed and they are of the same version. In case, they are not, then install Compact SP2 x86 and x64 MSIs from following link as needed: http://www.microsoft.com/downloads/details.aspx?familyid=E497988A-C93A-404C-B161-3A0B323DCE24&displaylang=en