The Message Queuing service cannot start due to bad registry value.

MSMQ.Rule.Alert.Event2000 (Rule)

Knowledge Base article:

Summary

The Message Queuing service cannot start due to bad registry value.

Causes

The MSMQ Service cannot start because it cannot read configuration information from the registry, due to a bad value. This may indicate either that the registry is corrupted or that Message Queuing was not installed properly.

Resolutions

Delete Message Queuing registry values and reinstall Message Queuing

Note: The following procedure will erase previous Message Queuing entries that are stored in the registry.

To perform these procedures, you must have membership in Administrators, or you must have been delegated the appropriate authority.

Delete registry values

To delete registry values:

Caution: Incorrectly editing the registry might severely damage your system. Before making changes to the registry, you should back up any valued data.

Open Registry Editor. To open Registry Editor, click Start. Click Run. In the open box, type regedit, and then press ENTER.

Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ.

Delete all registry keys beneath the MSMQ key.

Uninstall and reinstall Message Queuing (Windows XP)

To uninstall Message Queuing and then reinstall it on Windows XP:

In the left pane, click Turn Windows features on or off.

Clear the Microsoft Message Queue (MSMQ) server check box, and then click Remove.

Repeat steps 1 and 2.

In the Turn Windows features on or off section, select the desired Message Queuing components to install.

Uninstall and reinstall Message Queuing (Windows Server 2016)

To uninstall Message Queuing and then reinstall it on Windows Server 2016:

Open Server Manager. To open Server Manager, click Start, point to Administrative Tools, then click Server Manager.

In the console tree, click Features.

In the details pane, in the Feature Summary section, click Remove Features.

In the Remove Features Wizard, clear the Message Queue check box, and then click Remove.

After Message Queuing has been removed, in Server Manager, click Add Features.

In the Add Features Wizard, select the desired Message Queuing components to install, and then click Install.

Element properties:

TargetMSMQ.Server
CategoryAvailabilityHealth
EnabledFalse
Event_ID2000
Event Source$Target/Property[Type="MSMQ.Server"]/ServiceName$
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
The Message Queuing service cannot start due to bad registry value.
{0}
Event LogApplication

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
GenerateAlert WriteAction System.Health.GenerateAlert Default

Source Code:

<Rule ID="MSMQ.Rule.Alert.Event2000" Enabled="false" Target="MSMQ.Server" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>AvailabilityHealth</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$Target/Property[Type="MSMQ.Server"]/ServiceName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>2000</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertOwner/>
<AlertMessageId>$MPElement[Name="MSMQ.Rule.Alert.Event2000.AlertName"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/EventDescription$</AlertParameter1>
</AlertParameters>
<Suppression>
<SuppressionValue>$Data/EventDisplayNumber$</SuppressionValue>
<SuppressionValue>$Data/LoggingComputer$</SuppressionValue>
</Suppression>
</WriteAction>
</WriteActions>
</Rule>