title: How do you create a daemon like application to receive information from a windows service?
body: <p>The goal is for my main application to either launch or be told when a usb device is inserted.</p>
  
  <p>To achieve this, I created a windows service and a shared remote object.  I have a little windows forms application that runs in the background to launch the application.</p>
  
  <p>Its the little windows forms application I'm struggling with.  How can I get it to start automatically and stay running throughout the user session?  It seems to me I'm asking for a lot of bugs with this design.</p>
  
  <p>This little intermediate application simply does this:</p>
  
  <pre><code>channel = new TcpChannel(55555);
  ChannelServices.RegisterChannel(channel, false);
  RemotingConfiguration.RegisterWellKnownServiceType(typeof(SharedRemoteObject.RemoteObject), "USBDetectServer", WellKnownObjectMode.SingleCall);
  </code></pre>
  
  <p>That's all this thing does.  What is stopping me from putting this in the service itself, rather than have this intermediate program running?</p>
  
  <p>If I can't put it in the service, does anyone have suggestions about how you can have a little, GUI-less application running throughout the user session that is not a service?</p>