title: Batch script: how to check for admin rights
body: <p>How do I check if the current batch script has admin rights?</p>
  
  <p>I know how to make it call itself with runas but not how to check for admin rights. The only solutions I've seen are crude hack jobs or use external programs. Well, actually I don't care if it is a hack job as long as it works on Windows XP and newer.</p>