An Unattended Setup of MSMQ on Windows XP fails if the source path is 100 characters long.

Here's a bug that doesn't seem to have a KnowledgeBase article for it (I'll see if I can get that fixed [[Edit - No, I can't]] ).

When you want to install MSMQ on Windows XP automatically then you use a command line something like this:

Sysocmgr.exe  /i:{full path}sysoc.inf  /u:{full path}unattend.txt 

where unattend.txt contains the list of MSMQ components you are installing.

You may get a dialogue box that says something like:

"System stand-alone Optional Component Manager has encountered a problem and needs to close. We are sorry for the inconvenience".

This may set warning klaxons off with some people because the presence of non-standard words like "sorry" make it look like a malware problem. Rest assured, though, that this is a legitimate error message.

The error report has some additional information:

EventType: BEX
P1: sysocmgr.exe
P2: 5.1.2600.2180
P3: 41107cbf
P4: msmqocm.dll
P5: 5.1.0.1108
P6: 41109731
P7: 000101fa
P8: c0000409
P9: 00000000

As you can see from parameters 1 and 4, SYSOCMGR.EXE (the System stand-alone Optional Component Manager) is trying to load MSMQOCM.DLL (which does the work of installing MSMQ). The problem is indicated by P8 - 0xc0000409 means "The system detected an overrun of a stack-based buffer in this application."

The problem lies in the size of the path. If it is longer than 100 characters then an internal buffer overflows and setup will fail. The only workaround to this bug is to move the files to a directory location that has a shorter path.