Click here to Skip to main content
15,886,734 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Well my project depends on SQL Server Compact 3.5.1 , so I want it to be installed automatically and without any user interaction to make it easy for very basic users.
The two .msi are SSCERuntime_x86-ENU.msi , SSCERuntime_x64-ENU.msi and they'll be located in the same folder of the .exe

I've tried many sample codes but they didn't allow me to silent install the .msi , any help would be appreciated.

What I have tried:

try
{
string installCommandString = "/i {0} /qn";

Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
process.StartInfo = startInfo;

startInfo.UseShellExecute = false;
startInfo.RedirectStandardError = true;

startInfo.FileName = "SSCERuntime_x86-ENU.msi";
startInfo.Arguments = string.Format(installCommandString, "SQL Server MSI Path");

process.Start();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error");
}
Posted
Updated 18-Jul-16 8:20am

1 solution

Quote:
so I want it to be installed automatically and without any user interaction to make it easy for very basic users.

Preventing silent installation is a security feature.
getting around it as malware activity, so don't expect mush help here.
 
Share this answer
 
Comments
Sherif Kamel 18-Jul-16 14:26pm    
aha , so it's disabled by default :D now I get. Thanks for mentioning this out.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900