If you see 8007005, it may mean “access denied”, but it can also mean that it cannot find a .dll, such as “MQM.dll”.

Your environment variables for the “PATH” must include the directory that contains “MQM.dll”. Use must include the regular directory, and the one that ends with bin64 or bin32 (depending on which mode you are running in). Your 32 or 64 bit mode can be seen “MQ_ENV_MODE”.

In theory, the MQ install itself should update the Path statement for you, but we’ve two cases where it was not updated.

Example: D:\Program Files (x86)\IBM\WebSphere MQ\java\lib;D:\Program Files (x86)\IBM\WebSphere MQ\java\lib64;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;D:\Program Files (x86)\IBM\WebSphere MQ\bin64;D:\Program Files (x86)\IBM\WebSphere MQ\bin;D:\Program Files (x86)\IBM\WebSphere MQ\tools\c\samples\bin;D:\Program Files (x86)\Microsoft BizTalk Server 2010\;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;D:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files\Microsoft SQL Server\100\Tools\Binn\;D:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\

Other error messages which may lead to the above:
Retrieving the COM class factory for remote component with
CLSID {86E96D72-0011-4B28-B1AC-BF52AB47F1B4} from machine failed due to the Following error: 80070005

NOTE: One way for testing to see if a BizTalk Server “more or less” talks to an MQ server, is by going into BTAdmin Console, bringing up the configuration of the MQ port, and clicking the down arrow to see if the list of QueueNames is properly enumerated (or whether an error is thrown.)