You don't have to rely on custom actions for those.
In Visual Studio 2008 Standard there is a dialogue available using
Setup Project - Properties - Required Components
that, among other possibilities, exposes various versions of the .NET framework and (on my machine) SQL Server Compact 3.5 and SQL Server 2005 Express SP2 (x86).
So I guess, you will find what you need there.
Keep in mind to select "From same location as application" instead of "From distributor's website" or "From here: ..." in the radio button section. Otherwise there will be no data for that stuff packed in your setup package, but just links instead.
[Edit]
Here is code for the discussed possibility to wrap a setup package in another applications resources. Actually this is to unwrap it. This is executed during the wrapper applicaiton's runtime.
string tempPath = System.IO.Path.GetTempPath();
for (int tempIndex = 0; tempIndex < int.MaxValue; tempIndex++)
{
string myTempPath = System.IO.Path.Combine(tempPath, tempIndex.ToString());
if (
System.IO.Directory.Exists(myTempPath)
|| System.IO.File.Exists(myTempPath)
)
{
continue;
}
tempPath = myTempPath;
break;
}
string setupExePath = null;
{
string fileName = System.IO.Path.Combine(tempPath, "Setup.exe");
setupExePath = fileName;
using (System.IO.MemoryStream stream = new System.IO.MemoryStream(Properties.Resources.WhatYouCalledYourSetupFileResource))
{
System.IO.File.WriteAllBytes(fileName, stream.ToArray());
}
}
System.Diagnostics.Process.Start(setupExePath);
System.IO.Directory.Delete(tempPath, true);
[/Edit]