-
echo off
color 0b
mode con cols=80 lines=25echo **
echo.Shutdown.
echo **
echo Please select the action you want to take and press Enter:
echo 1.Timed shutdown.
echo 2.Countdown.
Shutdown. echo 3.Cancel the scheduled shutdown.
echo 4.View the task status.
echo 5.Cancel the countdown shutdown.
echo 6.Quit.
echo.:ks
set p choice=Please choose:
if i %choice%==1 goto gjif i %choice%==2 goto djsgjif i %choice%==3 goto delatif i %choice%==4 goto atif i %choice%==5 goto qxdif i %choice%==6 goto endecho input is invalid, please re-enter.
goto ks:gj
set time=
set /p time=
at %time%\tsshutdn 0 delay:0 powerdown >nul&&echo; set to %time% shutdown.
goto ks:djsgj
echo Please enter the countdown seconds:
set time=
set /p time=
shutdown /s /t %time%pause >nul:delat
At del y&&&echo has canceled the scheduled shutdown.
goto ks:at
atgoto ks:qxd
shutdown a&&&echo has canceled the countdown shutdown.
goto ks
Endexit This is what I wrote before, you can refer to it yourself, and ask again if you don't understand.
-
Foreword: A group of people who don't understand shouting and answering nonsense;
For the start command, you can check the help (nonsense, people can understand what else to do);
All kinds of commands have parameters, and different parameters achieve different functions;
To achieve your condition, you can use the k parameter;
For example, start cmd k color 2 means open a new command line and run color 2 on the new command line
start cmd /k echo hello!Open a new command line and display hello! on the new command line
rem sets the date format to yyyymmdd
if %date%==20080806 goto doitrem If the time is equal to 20080806 jump to the designator doitrem If the time is not equal to, proceed to the next step. >>>More
echo off
taskkill /f /t /im >>>More
attrib c: windows system32 +h, pay attention to the spaces. >>>More
echo off the beginning of the stove and the beginning of the blind carry the sacred mountain. >>>More
The identity framework automatically creates the membership tables we need to manage our users, so we don't need to worry about creating them in advance.