BizTalk360 EasyInstaller Silent mode for Remote PowerShell

Published on : Jul 3, 2013

Category : BizTalk Server

BizTalk360

Author

In my last post I introduced a new tool called EasyInstaller for configuring BizTalk 2013 on fresh BizTalk Azure VM (IaaS) and setting up BizTalk360 on the same VM in One-Click. There some interesting usecases being built around this tool, one of them is to run this tool using remote PowerShell. When you run Remote PowerShell, the command should not launch any GUI. If there is any GUI, the execution fails.  It was quite easy to make the main EasyInstaller GUI to go silent (#WPF #Visibility). However there is a small challenge with BizTalk silent configure.

BizTalk Configure – Silent

The EasyInstaller currently runs BizTalk Server SDK’s configure.exe to configure basic BizTalk configuration and passes ‘/s’  (silent) command line switch to run the configuration is silent mode. The main configuration window doesn’t showup, however a small dialog shows up to show the progress of the configuration. BizTalk Silent Configure

Solution

The solution to the problem was in my code again, currently I use ProcessStartInfo class to run the commands like Configure.exe. In order to supress the UI, ProcessStartInfo supports a property WindowStyle which can be set to ProcessWindowStyle.Hidden. So now the program looks like this.
var start = new ProcessStartInfo 
{ 
    Arguments = “/s BasicBizTalkConfig.xml /l ConfigLog.log”, 
   FileName = <BizTalkInstallDirectory>+“\Configure.exe”, 
   CreateNoWindow = true, 
   WindowStyle = ProcessWindowStyle.Hidden 
};
using (Process proc = Process.Start(start)) 
{ 
  proc.WaitForExit(); 
  return proc.ExitCode; 
}
Now the BizTalk Configuration progress window is not shown and the Remote PowerShell is happy. Happy BizTalking with BizTalk360. Note: Same thing can achieved in command line / batch file by running it through cmd.exe like  cmd.exe /C “<BizTalkInstallDirectory>\Configure.exe” “/s BasicBizTalkConfig.xml /l ConfigLog.log”

 

Author: Dhana Krishnasamy