title: Shutdown via batch file into infinite loop?
body: <p><strong>Problem:</strong> </p>
  
  <p>While running the batch file, it goes into infinite loop </p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>shutdown -s -t 050
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <p><strong>Ran the batch file</strong>
  <a href="https://i.stack.imgur.com/VnHqY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VnHqY.png" alt="enter image description here"></a></p>
  
  <p><strong>Output when i run in normal batch file:</strong>
  <a href="https://i.stack.imgur.com/dnYuQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dnYuQ.png" alt="enter image description here"></a></p>
  
  <p><strong>Output when i run in admin batch file:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/WUVUb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WUVUb.png" alt="enter image description here"></a></p>
  
  <p><strong>Question:</strong>
  Now I wonder why this happens, and want to know how to run shutdown command normally from batch file, if not like this ?</p>