title: C# register the same windows service with different parameters
body: <p>I need to create many windows services to host many WCF Service so I can stop a single one (for example to update it) and keep the other running.</p>
  
  <p>Since I don't want to create a windows service for every WCF Service I have, I'm trying to create a C# application that can register itself as a windows service but with different parameters (and service name of course).</p>
  
  <p>For example calling it this way:</p>
  
  <pre><code>MyService.exe /install WcfService1.dll
  MyService.exe /install WcfService2.dll
  </code></pre>
  
  <p>This creates two different windows service like these:</p>
  
  <pre><code>WcfService1 -&gt; MyService.exe /run WcfService1.dll
  WcfService2 -&gt; MyService.exe /run WcfService2.dll
  </code></pre>
  
  <p>I can't find a way to do this other than editing directly the registry.</p>