I've been looking around the internet for this, but I couldn't find it.
Is there a way to trigger an uninstaller (from the Programs and Features screen) via C#? Or is this blocked by Windows for security purposes?
You can use msiexec.exe. You can simply uninstall an application with its product code. Using command you can set whether to show UI during the uninstallation or make it a silent uninstallation,
string UninstallCommandString = "/x {0} /qn";
C# code
string UninstallCommandString = "/x {0} /qn";
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
process.StartInfo = startInfo;
startInfo.UseShellExecute = false;
startInfo.RedirectStandardError = true;
startInfo.FileName = "msiexec.exe";
startInfo.Arguments = string.Format(UninstallCommandString, "Product Code");
process.Start();
Have a look at C# - Installing and uninstalling software and Programmatically Uninstall Programs With C#
You could invoke the executable file for the uninstaller using system.diagnostics.
Something like the following should do the trick:
System.Diagnostics.Process.Start("/path/to/uninstall.exe", "arguments for uninstaller if needed, else don't bother with this arg");
It's quick and dirty and /should/ work. Hope that helps.
edit- Just realised you want to do this from the add remove software screen. I'll leave this here anyway but my mistake.