How can I find out if SP1 has been installed on a server which has .NET 3.5?
Assuming that the name is everywhere "Microsoft .NET Framework 3.5 SP1", you can use this:
string uninstallKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey))
{
return rk.GetSubKeyNames().Contains("Microsoft .NET Framework 3.5 SP1");
}