title: batch file will not run as administrator
body: <p>I am trying to run this code in a windows batch (.bat) file</p>
  
  <pre><code>@echo off
  
  echo Adding New User - LogMeInRemoteUser
  net user | find /i "LogMeInRemoteUser" || Net user LogMeInRemoteUser password /add /fullname:"LogMeInRemoteUser"
  
  pause
  
  echo Adding User to Administrators Group
  NET LOCALGROUP Administrators "LogMeInRemoteUser" /ADD
  
  pause
  
  echo Creating Registry Keys to remove the new user from the login page
  REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon\SpecialAccounts\UserList" /v "LogMeInRemoteUser" /t REG_DWORD /d 0
  
  pause
  
  echo Finished
  </code></pre>
  
  <p>if i run the file normally, i get an Access Denied error so I try to run as Administrator but the cmd windows opens and instantly closes, what have i done wrong?</p>