5

Problem:

While running the batch file, it goes into infinite loop

Code:

shutdown -s -t 050

Output:

Ran the batch file enter image description here

Output when i run in normal batch file: enter image description here

Output when i run in admin batch file:

enter image description here

Question: Now I wonder why this happens, and want to know how to run shutdown command normally from batch file, if not like this ?

arka.b
  • 204
  • 2
  • 13
frunkad
  • 2,433
  • 1
  • 23
  • 35
  • Does this answer your question? [My Batch File keeps looping, but why?](https://stackoverflow.com/questions/19047442/my-batch-file-keeps-looping-but-why) – Huseyin Yagli Apr 25 '23 at 19:06

1 Answers1

16

You called the batch file shutdown

Use a name that is not a system command or internal command.

foxidrive
  • 40,353
  • 10
  • 53
  • 68