I've been back at work on StreamInsight lately, and looking at using the Windows service-based host rather than run a self-contained .exe. Since I'd also been using the console for output, I was looking for a way to run the service as a console app. Turns out this is easy. StreamInsightHost.exe takes two optional command line parameters: -console and -config. You can guess what -console is for; -config specifies an alternate location for the config file. This parameter can use a relative filesystem path, but needs to specify the entire name of the config file (ie you can't just point it at the subdirectory that corresponds to your instance name).

So, if I'm trying to start the "MyInstance1" service equivalent, using the config file that the Windows service uses, these two lines will do it:

cd "C:\Program Files\Microsoft StreamInsight 1.0\Host"
.\StreamInsightHost -console -config MSSI.MyInstance1\StreamInsightHost.exe.config