Creating and Deploying Installation ComponentsMany of your components will make use of additional resources, such as performance counters, Event Logs, or databases. When you deploy your application, it is important that these additional resources are included in the final installation component. This is accomplished by including an instance of the Installer class in your setup project. The Installer class derives from the System.Configuration.Install.Installer class and includes the following methods :
When you choose Add Installer within the properties of a class, a new instance of the ProjectInstaller class will be added to your project. This object maintains a collection of Installer objects required for the instance to install the component within its Installers property. You may also create a custom class that inherits from the base Installer class to implement your own code by overloading the methods of the base class. To use an Installer component, open the Custom Actions Editor and then right-click the Custom Actions node and select Add Custom Action. Add the primary output from the Installer component. This will add the installation code from that component to the installation code for the project. When you install this component, the necessary setup configuration will be enacted on the installation host, provided you add the following to your class before compilation: <RunInstaller(true)> You may also use the Installer Tool ( InstallUtil.exe ) command-line utility to install an assembly that includes additional component resources, as shown here: InstallUtil.exe MyComponent.dll InstallUtil.exe MyComponent.dll AnotherComponent.dll This utility may also be used to uninstall a component, as shown here: InstallUtil.exe /u MyComponent.dll |