-3

I'm trying to make batch file that restarts pc. So the batch file closes right after start and the system is not restarting. Because i'm not sure which command for restart is right i put all i found.

title System restart script
echo Restarting in progress
shutdown.exe /r /t 00
shutdown -t 0 -r -f
shutdown -t 00 -r
shutdown.exe -r -t 00
AtanasBobev
  • 21
  • 1
  • 2
  • 1
    _So the batch file closes right after start and the system is not restarting_ This makes no sense. – Gerhard Jan 30 '18 at 08:44

1 Answers1

-1

shutdown.exe -r -t 00 or shutdown.exe /r /t 00. The r flag is the one indicating reboot, and the t flag indicates how much delay before executing the action.

See this Windows article or this SO answer for more information.

Kevin
  • 354
  • 2
  • 4
  • 13