Microsoft Windows CE 3.0  

Installing MSMQ Using the MSMQADM Utility

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

You can install MSMQ by running the MSMQADM utility as part of your own installation program.

Your installation program needs to check if an MSMQ installation already exists on this computer. It can do this by checking for the existence of HKEY_LOCAL_MACHINE\Software\Microsoft\MSMQkey. If the key exists, MSMQ is already installed. If MSMQ is not already installed, your program must run MSMQADM.EXE twice. The first time it installs MSMQ as a device driver; the second time it configures the MSMQ service.

To install MSMQ as a device driver, type

msmqadm.exe -f \temp\msmqadm.txt register install
NETREG

This command installs MSMQD and NETREGD as device drivers on the system and configures NETREGD to either use redirector for NetBIOS registration and services. Alternatively, you can provide NetBIOS services if a redirector is not available.

The command -f instructs MSMQADM.EXE to redirect output to the file whose name follows the switch, for example "\temp\msmqadm.txt". If registration is successful, there is no output — the file is empty. In case of an error, the file will contain an error message.

To configure the MSMQ service, type

msmqadm.exe -f \temp\msmqadm.txt register

You can also supply standard registry parameters to supply globally unique identifier (GUID), MSMQ store directory, name of outgoing routing service (out FRS) server, and other parameters. Look in the administration section of the MSMQ User guide for information on MSMQADM parameters.

Certain registration parameters can only be changed using the following command:

msmqadm.exe -f \temp\msmqadm.txt change

When MSMQ is installed and configured, your installation program must cause a reboot so that the MSMQ device driver can be loaded. It is important that this reboot be a "hard reset" (the equivalent of pressing the reset button located on the back of most devices) and not simply a "power off/on." After the reboot, MSMQ will start automatically. You can run the following commands to control its execution later:

msmqadm.exe -f \temp\msmqadm.txt start
msmqadm.exe -f \temp\msmqadm.txt stop

Because other applications might be using MSMQ, you should only stop the service for short periods of time, and only if absolutely necessary — (for example, to perform a backup or restore operation).