Reference : Puzzling Blog

  1. START –> Run –> cmd
  2. For Restart => shutdown -r -t 01
  3. For Shutdown => shutdown -s -t 01

DOS command script

:START
cls
@echo off
echo.
echo Remote Desktop Client – shutdown or restart
echo.
echo When you use Remote Desktop you do not have
echo the usual restart/shutdown choices.
echo This will RESTART or SHUTDOWN the remote client
echo according to your choice.
echo.
echo 1. Restart
echo 2. Shutdown
echo 3. Abort
echo.
set /p userinp= Choose a number(1-3):
set userinp=%userinp:~0,1%
if “%userinp%”==”1” goto restart
if “%userinp%”==”2” goto shutdown
if “%userinp%”==”3” goto end
echo invalid choice
goto start

:restart
Echo Program: Please wait….
shutdown -r -t 01
goto end

:shutdown
shutdown -s -t 01
goto end

:end

Advertisements