I did include some rough details on this in the SQL_CE folder, ReadMe.txt file, under the section header "Upgrading from 2.0". It explains downloading
this tool which will allow you to point it to an SDF and run a script against it.
That tool has 2 different downloads. The latest download is a VS add-in, and the other download is a standalone version. I didn't try the standalone version, but it probably works just as well as the VS add-in version.
If you install the VS add-in version, the way to get to it is to open up "Server Explorer" which should be in the VS Express Edition (View -> Server Explorer). There should then be a new toolbar icon in the Server Explorer that launches the SQL
Server Compact Toolbox, shown below.
That will open up a new window. You can add a "SQL Server Compact 4.0 Connection", pointing to your SDF file (make a backup first). On the connection, you can right-click on the connection and select "Open SQL Editor". Paste in the script
and run it.