Archive: Check if message queue component was installed


Check if message queue component was installed
Hi, everybody. My application work with message queue, so in the installer i need to check if message queue component was installed or not. I 've tried "sysocmgr" but it will just install component or uninstall component.


Apparently the files are on every system by default and installing it installs the service. You can check for these registry keys:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSMQ
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MQ1SYNC

Do something like this:


Function IsMsqmInstalled
Push $R0
ClearErrors
ReadRegStr $R0 HKLM "System\CurrentControlSet\Services\MSMQ" ""
IfErrors lbl_na
StrCpy $R0 1
Goto lbl_end
lbl_na:
StrCpy $R0 0
lbl_end:
Exch $R0
FunctionEnd


It'd work for XP but I cannot say for Vista or 7.