title: Check if user can start service
body: <p>I just searched a lot in the web but I could not found any help. I have a own windows service and now it should be possible to configure it from my main software.</p>
  
  <p>I have no problems with installing, starting, stopping, changing and uninstalling it. I can also install the service with other user credentials.</p>
  
  <p>But there's the problem. Before installing the service ("cmd" call <strong><em>sc create SERVICENAME [...]</em></strong>) I want to check if the user with the entered credentials can start services or not. So I need to check if he is entered at the local "Log On as a Service" security policy. I do <strong>not</strong> want to change the policy, I only want to check if he is allowed to do this.</p>
  
  <p>Is it possible to do this check simply in C#?</p>