-
Notifications
You must be signed in to change notification settings - Fork 0
/
shut.bat
106 lines (91 loc) · 2.88 KB
/
shut.bat
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
@ECHO OFF
title Van's Shutdown
color 0a
mode 100,50
call :main
EXIT /B %ERRORLEVEL%
:main
cls
echo.
echo **** **** ************ ***** ******** ******** **** **** ************
echo **** **** ************ ***** ********** ********** ***** ***** ************
echo **** ***** **** ***** ***** **** **** **** **** ****** ****** *****
echo **** ******* **** ********** ***** **** **** **** ************* **********
echo ******* ******* ********** ***** **** **** **** **** * **** **********
echo ****** ****** ***** ***** **** **** **** **** **** **** *****
echo **** **** ************ *********** ********* ********* **** **** ************
echo **** **** ************ *********** ******* ******* **** **** ************
echo.
echo.
echo.
echo to Van's Command
echo.
echo.
echo.
pause
call :dashboard
:dashboard
cls
echo.
echo.
echo.
echo.
echo [1] Shutdown
echo [2] Shutdown and Lock
echo [3] Abort Shutdown
echo [4] Attrib
echo [-] Back
echo [x] Exit
echo.
set /p action=. What do you want to do?
if %action%==1 (call :shut)
if %action%==2 (call :shutlock)
if %action%==3 (call :abort)
if %action%==4 (call :attrib)
if %action%==- (call :back main)
if %action%==x Exit
EXIT /B 0
:shut
set /p timeShut= Enter hour(s):
if %timeShut%==- (call :back dashboard)
if %timeShut%==x Exit
set /a shutSeconds= (%timeShut% * 3600)
if %shutSeconds%==0 (call :back dashboard)
cls
echo %timeShut% hour(s) to shutdown...
start shutdown.exe /s /t %shutSeconds%
Rem echo This message will close automatically
TIMEOUT /T 10
EXIT /B 0
:shutlock
set /p timeShut= Enter hour(s):
if %timeShut%==- (call :back dashboard)
if %timeShut%==x Exit
set /a shutSeconds= (%timeShut% * 3600)
if %shutSeconds%==0 (call :back dashboard)
cls
echo %timeShut% hour(s) to shutdown...
start shutdown.exe /s /t %shutSeconds%
Rem echo This computer will be locked down
TIMEOUT /T 10
rundll32.exe user32.dll, LockWorkStation
EXIT /B 0
:abort
start shutdown.exe -a
cls
echo Shutdown cancelled
echo Redirecting...
TIMEOUT /T 5
call :main
:back
if %~1==main (call :main)
if %~1==dashboard (call :dashboard)
exit /b 0
:attrib
set /p drive= Enter drive letter:
if %drive%==- (call :back dashboard)
if %drive%==x Exit
start attrib.exe -s -h -r /s /dxi %drive%:*.*
echo Attrib Success
pause
EXIT /B 0