Take care when editing the registry for MSMQ

Had a successful day today - I resolved an issue using a Knowledgebase article. The problem was that it took 6 hours to confirm that the article really had the solution.

The first step had been to edit the registry by creating a value as dictated by the article. A quick copy'n'paste and a restart of the MSMQ service and ... no change, even though the article was a perfect match. No amount of head-scratching and staring at logs would help. Until I exported the registry value to a text file to show someone else....

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\security]
"MagicRegistryChange "=dword:00000001

when I noticed that the copy from the text of the article had picked up a trailing space! "MagicRegistryChange " does NOT equal "MagicRegistryChange" and recreating the value without the space introduced the required solution.

Another way to confim that registry changes are correct is to see if TMQ recognises them. You can download TMQ from here and generate a report with the command "TMQ STATE -V -D" that lists all the MSMQ registry values. For example:

--- Going to Find unknown registry values
Value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\SetupStatus: 0x0 (of type REG_DWORD)
Value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\MsmqRootPath: C:\WINDOWS\system32\msmq (of type REG_SZ)
Value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\DsEnvironment: 0x2 (of type REG_DWORD)
...
...

If you don't see your registry value being picked up then go back to the registry and recreate it. Get someone to check your speeling too. :-)