title: Programmatically Install Windows Service On Remote Machine
body: <p>Similar to <a href="https://stackoverflow.com/a/467565/774828">https://stackoverflow.com/a/467565/774828</a> which shows how to start and stop an existing Windows service on a remote machine, I am trying to install a Windows Service on a remote machine. I can start and stop the services on the remote machine fine, but I can't find how to install a new service remotely, without resorting to calling the sc.exe process (<a href="https://stackoverflow.com/a/1159059/774828">https://stackoverflow.com/a/1159059/774828</a>) which I want to avoid if possible.</p>
  
  <p>I know there is a System.Configuration.Install.ManagedInstallerClass.InstallHelper method, but I cannot get this to work to install on a remote machine. And, I cannot figure out if I can use System.ServiceProcess.ServiceInstaller or System.ServiceProcess.ServiceProcessInstaller.</p>