Assembly: System.Messaging (in system.messaging.dll)
The MessageQueueInstaller is used by the installation utility to write registry values that are associated with the queue. For more information about installation utilities, see Installer Tool (Installutil.exe).
To install a queue, create a project installer class that inherits from the Installer, and set the RunInstallerAttribute for the class to true. Within your project, create a MessageQueueInstaller instance for each queue in the installation and add the instance to your project installer class.
When creating a MessageQueueInstaller instance, you can optionally pass an existing MessageQueue (for example, from a test server) to the MessageQueueInstaller constructor. This approach automatically provides the configuration settings for the new queue by mirroring the settings of the queue passed in. Alternatively, you can manually set the properties in the MessageQueueInstaller instance to the states you want and call the default constructor.
When the install utility is called, it looks for the RunInstallerAttribute. If it is true, the utility installs all the queues in the Installers collection associated with your project installer. If RunInstallerAttribute is false, the utility ignores the project installer.
You modify other properties of a MessageQueueInstaller instance either before or after adding the instance to the Installers collection of your project installer. For example, a queue's Path must be set before the install utility executes.
Typically, you do not call the methods of the MessageQueueInstaller from within your code; they are generally called only by the installutil.exe installation utility. The utility automatically calls the Install method during the installation process and calls Commit if the installation did not throw an exception. It backs out failures, if necessary, by calling Rollback for the object that generated the exception.
An application's install routine uses the project installer's Installer.Context to automatically maintain information about the components that have already been installed. This state information is continuously updated as each MessageQueueInstaller instance is installed by the utility. It is not usually necessary for your code to explicitly modify the state information.
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.