# How do I automate installation of the MSMQ components on a Windows client?

I'm looking at message queueing for client/server communication in a new product. One of the problems with MSMQ is that it's not installed by default on most Windows desktops, and that it doesn't seem to be available as a redistributable for inclusion in our MSI.

Given that the administrator will have access to Microsoft SMS or ConfigMgr or similar, how do I persuade them that it's easy to install? That is: how do I automate installation of the MSMQ components?

-
add comment

## 1 Answer

This should get you started:

You will need to do the following to get an unattended installation of MSQM:

1. Create the files InstallMSMQ.bat and MSMQ.txt based on the text below
2. Have an ISO of the OS that your using available via a network share called Iso Library
3. Have Pismo File Mount downloaded and available via a network share called resource
4. Run the script something like PSExec that connects to the machine and tells the machine to run the script from a network share

## InstallMSMQ.bat

:Variables
:: Path Variables
SET IsoPath=\\server1\ISO Library
SET ResourcePath=\\server2\Resource
SET ScriptPath=%~dp0
SET ScriptPath=%ScriptPath:~0,-1%
SET MountPath=m:

:: Application Variables
SET PismoMount=pfm mount -m %MountPath%
SET PismoUnMount=pfm unmount

echo -Installing Pismo File Mount
"%ResourcePath%\pfmap-051.exe" /q

echo Configuring Windows install location source path
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\ /v "SourcePath" /t REG_SZ /d %MountPath%\ /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\ /v "ServicePackSourcePath" /t REG_SZ /d %MountPath%\ /f

sysocmgr /i:%WINDIR%\inf\sysoc.inf /u:"%ScriptPath%\MSMQ.txt" /x /q


## MSMQ.txt

[Version]
Signature = "$Windows NT$"

[Global]
FreshMode = Custom
MaintenanceMode = RemoveAll
UpgradeMode = UpgradeOnly

[Components]
msmq = on
msmq_Common = on
msmq_Core = on
msmq_TriggersService = on
msmq_HTTPSupport = off
msmq_LocalStorage = on
msmq_ADIntegrated = off

[Msmq]
ControllerServer=
SupportingServer=
ServerAuthenticationOnly=
Site=


If you need more information about the various parts of the script let me know and I will try to write up something that explains all the parts.

-
add comment