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.
class CustomInstaller : Installer