title: Need a way to check status of Windows service programmatically
body: <p>Here is the situation:</p>
  
  <p>I have been called upon to work with InstallAnywhere 8, a Java-based installer IDE, of sorts, that allows starting and stopping of windows services, but has no built-in method to query their states.  Fortunately, it allows you to create custom actions in Java which can be called at any time during the installation process (by way of what I consider to be a rather convoluted API).  </p>
  
  <p>I just need something that will tell me if a specific service is started or stopped.</p>
  
  <p>The IDE also allows calling batch scripts, so this is an option as well, although once the script is run, there is almost no way to verify that it succeeded, so I'm trying to avoid that.</p>
  
  <p>Any suggestions or criticisms are welcome.</p>