title: Simple check in java to find out if running as administrator
body: <p>Is there a simple, quick, non-invasive windows admin task that can be performed from a java process to validate if the current process is running as administrator?</p>
  
  <p>I know we could run batch commands to check if current user is member of administrator group. But there are complications of portability across Vista etc.</p>
  
  <p>A simple example would be:</p>
  
  <pre><code>echo. 2&gt; %SYSTEMROOT%\EmptyFile.txt
  </code></pre>
  
  <p>However, this is invasive. We dont want to create files </p>
  
  <p>Any other option?</p>