This documentation is archived and is not being maintained.

MessageQueueInstaller Class

Allows you to install and configure a queue that your application needs in order to run. This class is called by the installation utility, for example InstallUtil.exe, when installing a MessageQueue.

For a list of all members of this type, see MessageQueueInstaller Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Configuration.Install.Installer
            System.Configuration.Install.ComponentInstaller
               System.Messaging.MessageQueueInstaller

[Visual Basic]
Public Class MessageQueueInstaller
   Inherits ComponentInstaller
[C#]
public class MessageQueueInstaller : ComponentInstaller
[C++]
public __gc class MessageQueueInstaller : public ComponentInstaller
[JScript]
public class MessageQueueInstaller extends ComponentInstaller

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

The MessageQueueInstaller is used by the installation utility to write registry values that are associated with the queue. For more information on 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.

Requirements

Namespace: System.Messaging

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Messaging (in System.Messaging.dll)

See Also

MessageQueueInstaller Members | System.Messaging Namespace | Installer Tool (Installutil.exe)

Show: