Checking for SQL Server Compact Edition 2005
Based on some other code I read in these forums (I apologize for not remembering the name of the user that posted the code) here is some code to look for SQL Server 2005 Compact Edition.

The installer file for SQL Server 2005 Compact Edition is installed with the program.

File "<Your path to the runtime here>\SQLServerCE31-EN.msi"

This part is added to the end of section -Post:

;=== Check to see if SQL Server Compact Edition 2005 is installed.
ReadRegStr $R0 HKLM \ "SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.1\" InstallDir
${If} $R0 == ""
MessageBox MB_ICONEXCLAMATION|MB_OK "SQL Server 2005 Compact Edition not detected, press any key to install"
ExecWait '"msiexec" /i "$INSTDIR\SQLServerCE31-EN.msi"'
${Else}
; Do nothing - already installed
${EndIf}