Click here to Skip to main content
15,885,876 members
Please Sign up or sign in to vote.
1.18/5 (4 votes)
See more:
I am working with I am trying to install the exe file into my system without pressing the next button. How can i approach this one through programatically in c#

any ideas with this please help me....

C# Code to install MSI silently and know when it is done

If you want to install an application that is packaged as an .MSI and you want to know when the application has finished installing, use this code:
string installerFilePath; installerFilePath = "C:\\Program Files\\CCS\\Downloads\\CCSRPTSetup.msi"; 
System.Diagnostics.Process installerProcess;
 installerProcess = System.Diagnostics.Process.Start(installerFilePath, "/q");
 while (installerProcess.HasExited==false) 
//indicate progress to user 
Application.DoEvents(); System.Threading.Thread.Sleep(250); 
MessageBox.Show("done installing");
Share this answer
Member 14037166 2-Jul-19 23:14pm    
i need code to install exe programs silently
Consider Autoit[^]
Share this answer
Denno.Secqtinstien 10-Oct-12 2:22am    
or you may use exe instead of msi in my amswer given below.
Above solution doesn't work for setup.exe file. I see such solutions in many places, but don't see any for installing via setup.exe.
Share this answer

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