Windows 10 64bit
Prepare two files, shutdown.bat
and count.txt
on you Desktop
// Shutdown.bat
@echo off
cd C:\Users\lol\Desktop
set /p Number=<count.txt
if %Number% == 1 (
@echo 0 > count.txt
echo %Number%
)
if %Number% == 0 (
shutdown -r -t 10 // restart computer after 10 seconds
@echo 1 > count.txt
)