title: Windows: Batch File: Only Run as Administrator
body: <p>I have a batch file to start an application as a Windows service. It is called start.bat</p>
  
  <pre><code>@ECHO off
  START c:\Ruby193\bin\ruby c:\Ruby193\bin\thin start -R c:\coolapp\config.ru -p 4321 -a localhost -e production
  </code></pre>
  
  <p>My challenge is that this program only runs properly if it is "Run as Administrator" with admin privileges. So, I would like to add a line to check if this script is actually run with administrative privileges, and only execute if it is being run as administrator. </p>
  
  <p>How can I do that from within the script?</p>