如何在 Windows 客户端上自动安装 MSMQ 组件?

如何在 Windows 客户端上自动安装 MSMQ 组件?

我是查看消息队列用于新产品中的客户端/服务器通信。MSMQ 的一个问题是,它不是默认安装在大多数 Windows 桌面上的,而且它似乎不能作为可再发行版本包含在我们的 MSI 中。

假设管理员可以访问 Microsoft SMS 或 ConfigMgr 或类似程序,我该如何说服他们安装起来很容易?即:如何自动安装 MSMQ 组件?

答案1

这应该可以帮助你入门:

您需要执行以下操作以获取 MSQM 的无人值守安装:

  1. 根据以下文本创建文件 InstallMSMQ.bat 和 MSMQ.txt
  2. 通过名为 Iso Library 的网络共享获取您所使用的操作系统的 ISO
  3. Pismo 文件挂载下载并通过网络共享(称为资源)提供
  4. 运行类似 PSExec 的脚本,连接到计算机并告诉计算机从网络共享运行脚本

安装MSMQ.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=

如果您需要有关脚本各个部分的更多信息,请告诉我,我会尝试写一些内容来解释所有部分。

相关内容