我正在编写一个脚本来自动安装 BizTalk Server,然后通过 BizTalk“configuration.exe”实用程序应用配置。当我在本地运行 configuration.exe 实用程序并为其提供配置 xml 时,它工作正常,并且它在配置过程中显示一个对话框,无需任何用户交互即可显示进度。
我遇到的问题是当我尝试通过 Powershell 远程执行 configuration.exe 时。未应用配置,并且 configuration.exe 进程在进程资源管理器中出现几秒钟,然后退出。
我检查了错误日志,似乎 configuration.exe 在尝试显示其进度窗口时崩溃,但它无法远程执行此操作。错误日志中出现的 3 个错误是:
Windows 错误报告:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Windows Error Reporting" />
<EventID Qualifiers="0">1001</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-12-03T13:24:10.000000000Z" />
<EventRecordID>3956</EventRecordID>
<Channel>Application</Channel>
<Computer>HOSTNAME</Computer>
<Security />
</System>
- <EventData>
<Data />
<Data>0</Data>
<Data>CLR20r3</Data>
<Data>Not available</Data>
<Data>0</Data>
<Data>configuration.exe</Data>
<Data>3.0.1.0</Data>
<Data>4c5479ac</Data>
<Data>System.Windows.Forms</Data>
<Data>4.0.0.0</Data>
<Data>4f61a8cc</Data>
<Data>3e06</Data>
<Data>ee</Data>
<Data>System.InvalidOperationException</Data>
<Data />
<Data />
<Data>C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_configuration.ex_120852993cfe8d93d2aac7a1cea49f9a18b688_345a8b46</Data>
<Data />
<Data>0</Data>
<Data>b823ff23-3d4c-11e2-ae6f-005056bc6ac0</Data>
<Data>4</Data>
</EventData>
</Event>
应用程序错误:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-12-03T13:24:10.000000000Z" />
<EventRecordID>3955</EventRecordID>
<Channel>Application</Channel>
<Computer>HOSTNAME</Computer>
<Security />
</System>
- <EventData>
<Data>Configuration.exe</Data>
<Data>3.9.469.0</Data>
<Data>4c5479ac</Data>
<Data>KERNELBASE.dll</Data>
<Data>6.1.7601.17651</Data>
<Data>4e211319</Data>
<Data>e0434352</Data>
<Data>0000b9bc</Data>
<Data>1be0</Data>
<Data>01cdd1597a111847</Data>
<Data>C:\Program Files (x86)\Microsoft BizTalk Server 2010\Configuration.exe</Data>
<Data>C:\Windows\syswow64\KERNELBASE.dll</Data>
<Data>b823ff23-3d4c-11e2-ae6f-005056bc6ac0</Data>
</EventData>
</Event>
.NET 运行时错误:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-12-03T13:24:10.000000000Z" />
<EventRecordID>3954</EventRecordID>
<Channel>Application</Channel>
<Computer>HOSTNAME</Computer>
<Security />
</System>
- <EventData>
<Data>Application: Configuration.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException Stack: at System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window) at System.Windows.Forms.Form.ShowDialog() at Microsoft.BizTalk.Configuration.Program.RunConfigProgressUIThread() at System.Threading.ThreadHelper.ThreadStart_Context(System.Object) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.ThreadHelper.ThreadStart()</Data>
</EventData>
</Event>
我已经检查了可以传递给 configuation.exe 的选项,因为我知道一些 MSI 和 EXE 安装程序确实有 /silent 选项,但这个 EXE 似乎没有。
我也尝试通过 PSExec 运行它,但我遇到了类似的错误。
请让我知道是否有办法远程运行它。谢谢。