How to: Configure Installation Components
When an installation component is created for a component in your project, Visual Studio copies property values that are necessary for the installer to recreate the chosen resource. For example, for aninstaller, the system copies the values of the and properties and uses these values during installation to create your log in the correct location.
The property values are copied either from the component or from the resource with which the component interacts on your test server. For example, suppose you have an instance of thecomponent that interacts with a test queue called OrdersReceived on a server called server1. When you create an installer for this component, it copies the property's value from the component, and then uses this to locate the resource on the test computer. All of the properties set for that resource on the test computer are also copied to installation code. If there is no physical test resource, the system copies all of its values from the component, and you need to fill in the missing necessary properties manually in the Installer1 class.
The following code shows how the default properties for this MessageQueue installer might look in the Installer1 class:
Private WithEvents MessageQueueInstaller1 As System.Messaging.MessageQueueInstaller Private Sub InitializeComponent() Me.MessageQueueInstaller1 = New System.Messaging.MessageQueueInstaller MessageQueueInstaller1.MaximumJournalSize = 4294967295& MessageQueueInstaller1.BasePriority = 0% MessageQueueInstaller1.Path = "server1\OrdersReceived" Me.Installers.Add(MessageQueueInstaller1) End Sub
You can manually edit the property values if there is a property that you want to set differently on the deployment computer. In addition to changing default property values, you can also override some of the default methods in the installation component if you want to change the processing that occurs during installation. For more information, see.
To change the default values for an installation component
After adding an installation component to your solution, open the Installer1 class.
Locate the installation component you want to modify, and access it in the Code Editor.
Locate the InitializeComponent procedure. The default property values for your component are located within this procedure.
Make any changes you need to make to the property values that will be used to create your component.