Using Installer with Installer class in .NET Framework
Installer is very important part of any application deployment process which is written in .NET Code be it C# or VB.NET or ASP.NET. We achieve several important objectives by employing installer class within .NET framework. First, we create professional looking application with installation process being very simple. Second, we take care of creating shortcuts and settings that we require to run our application on the computer. Finally, we provide easy way to uninstall application from the computer and also clean up disk from unnecessary files which otherwise clog our system.
If you decide to implement your customer installer, you need to use Installer class. There are two different types of installers one is AssemblyInstaller and another one is ComponentInstaller.
In order to create custom installer we need to inherit the Installer class and then override following methods Install, Commit, Rollback, and Uninstall. We also need to add RunInstallerAttribute to our derived class and set it to true. After that we insert this derived class into our assembly with the application files. Last step is to invoke installer with the help of InstallUitl.exe.
namespace MyInstallerDemo
{
class CustomInstaller : Installer
{
}
}