I am writing an application that installs programs in the back end, I am looking of a way to get the progress of the installer. Is there a way to do this preferably using standard .net framework?
1 Answers
Looking at a similar SO question here, there is a nicely wrapped class for getting data from the windows installer at codeplex here.
However, it seems a little more complex for what you likely need. I would probably just use the standard MSIEXEC.exe command via something like:
using System.Diagnostics;
ProcessStartInfo startInfo = new ProcessStartInfo("msiexec.exe");
startInfo.Arguments = "YOUR ARGUMENT FLAGS HERE";
Process.Start(startInfo);
The sample above refers to C#, but there are others .NET languages that support this concept - see MSDN. You can add flags to the MSIEXEC to control what type of installation you want -- such as whether it is silent, whether it displays a progress bar, whether UI is included, etc.
You can get the arguments used by simply going to your command prompt and typing in msiexec. It will display all the arguments that you can use for it and you can experiment with it through command prompt to get the desired functionality. Alternatively, the flags can be found here.