-
Notifications
You must be signed in to change notification settings - Fork 0
/
Shutdown_EN
52 lines (49 loc) · 1.25 KB
/
Shutdown_EN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@echo off
echo Please choose one task you want to do,enter e close
echo Enter 1 set auto shutdown time
echo Enter 2 cancel auto shutdown
:choice
set /p n=Please enter your choose:
if %n%==1 goto 1
if %n%==2 goto 2
if %n%==e (exit) else (goto 0)
:0
cls
echo Please choose one task you want to do,enter e close
echo Enter 1 set auto shutdown time
echo Enter 2 cancel auto shutdown
echo.
echo ---------------------resault------------------------
echo Error! Command does not exist
echo.
echo.
goto choice
:1
cls
echo Please choose one task you want to do,enter e close
echo Enter 1 set auto shutdown time
echo Enter 2 cancel auto shutdown
echo.
echo ---------------------resault------------------------
set /p timem=Please enter time(minute)
set /a times=%timem%*60
if %times% lss 60 (
echo Error! Input value must be an integer greater than 1
echo You entered is %timem%,not matched) else (
shutdown -s -t %times%
echo You computer will shutdown at %timem% minutes later)
echo.
echo.
goto choice
:2
cls
echo Please choose one task you want to do,enter e close
echo Enter 1 set auto shutdown time
echo Enter 2 cancel auto shutdown
echo.
echo ---------------------resault------------------------
shutdown -a
echo Auto shutdown has been cancelled
echo.
echo.
goto choice