2020国产成人精品视频,性做久久久久久久久,亚洲国产成人久久综合一区,亚洲影院天堂中文av色

分享

不用任何軟件實(shí)現(xiàn)定時(shí)關(guān)機(jī)

 周巍的森林 2006-12-29
一個(gè)功能比較全的定時(shí)關(guān)機(jī)程序,運(yùn)行界面如圖:




把下面的(紅色)代碼復(fù)制到記事本另存為shutdown.bat即可實(shí)現(xiàn)上面的功能!


@ECHO off
TITLE greaterthanme-實(shí)現(xiàn)定時(shí)關(guān)機(jī)、注銷、重啟、鎖定等功能。

:start
CLS
COLOR 1f
rem 使用COLOR命令對(duì)控制臺(tái)輸出顏色進(jìn)行更改
MODE con: COLS=41 LINES=18
rem MODE語(yǔ)句為設(shè)定窗體的寬和高
set tm1=%time:~0,2%
set tm2=%time:~3,2%
set tm3=%time:~6,2%
ECHO %date% %tm1%點(diǎn)%tm2%分%tm3%秒
ECHO =========================================
ECHO 請(qǐng)選擇要進(jìn)行的操作,然后按回車
ECHO ───────────────
ECHO.
ECHO 1. 定時(shí)關(guān)機(jī)
ECHO 2. 倒計(jì)時(shí)關(guān)機(jī)
ECHO 3. 刪除定時(shí)關(guān)機(jī)任務(wù)
ECHO 4. 查看任務(wù)狀態(tài)
ECHO 5. 刷新當(dāng)前時(shí)間
ECHO 6. 重新啟動(dòng)
ECHO 7. 鎖定計(jì)算機(jī)
ECHO 8. 注銷
ECHO 9. 退出
ECHO.

:cho
SET Choice=
SET /P Choice=選擇:
rem 設(shè)定變量"Choice"為用戶輸入的字符
IF NOT "%Choice%"=="" SET Choice=%Choice:~0,1%
rem 如果輸入大于1位,取第1位,比如輸入132,則返回值為1
ECHO.
IF /I "%Choice%"=="1" GOTO SetHour
IF /I "%Choice%"=="2" GOTO outtime
IF /I "%Choice%"=="3" GOTO delAt
IF /I "%Choice%"=="4" GOTO view
IF /I "%Choice%"=="5" GOTO start
IF /I "%Choice%"=="6" GOTO restart
IF /I "%Choice%"=="7" GOTO lock
IF /I "%Choice%"=="8" GOTO logoff
IF /I "%Choice%"=="9" GOTO end
rem 為避免出現(xiàn)返回值為空或含空格而導(dǎo)致程序異常,需在變量外另加雙引號(hào)
rem 注意,IF語(yǔ)句需要雙等于號(hào)
rem 如果輸入的字符不是以上數(shù)字,將返回重新輸入
ECHO 選擇無(wú)效,請(qǐng)重新輸入
ECHO.
GOTO cho

:SetHour
CLS
ECHO.
SET ask=
SET /p ask=是否設(shè)定為每天執(zhí)行關(guān)機(jī)命令(y/n):
IF NOT "%ask%"=="" SET ask=%ask:~0,1%
IF /I "%ask%"=="y" GOTO yes
IF /I "%ask%"=="n" GOTO no
GOTO SetHour

:yes
ECHO 請(qǐng)指定24小時(shí)制式時(shí)間,格式為 小時(shí):分鐘
SET shutdowntime=
SET /p shutdowntime=輸入:
at %shutdowntime% /every:M,T,W,Th,F,S,Su tsshutdn 0 /delay:0 /powerdown >nul
rem 設(shè)定為每周的星期一至星期日,即為每天
IF NOT errorlevel 1 GOTO ok
rem 如果輸入正確,就執(zhí)行ok段的語(yǔ)句
ECHO %shutdowntime% 不是標(biāo)準(zhǔn)的時(shí)間格式,請(qǐng)重新輸入
ECHO.
GOTO yes

:no
ECHO 請(qǐng)指定24小時(shí)制式時(shí)間,格式為 小時(shí):分鐘
SET shutdowntime=
SET /p shutdowntime=輸入:
at %shutdowntime% tsshutdn 0 /delay:0 /powerdown >nul
IF NOT errorlevel 1 GOTO ok
ECHO %shutdowntime% 不是標(biāo)準(zhǔn)的時(shí)間格式,請(qǐng)重新輸入
ECHO.
GOTO no

:ok
ECHO.
SET h=%shutdowntime:~1,1%
SET ah=%shutdowntime:~0,1%
SET am=%shutdowntime:~2,2%
SET bh=%shutdowntime:~0,2%
SET bm=%shutdowntime:~3,2%
IF "%h%"==":" (
SET HM=%ah%時(shí)%am%分
) ELSE (
SET HM=%bh%時(shí)%bm%分)
rem 如果輸入h:mm則HM=h時(shí)mm分,否則HM=hh時(shí)mm分
IF /I "%ask%"=="y" ECHO 系統(tǒng)將于每天的%HM%關(guān)閉
IF /I "%ask%"=="n" ECHO 系統(tǒng)將于%HM%關(guān)閉
ECHO 設(shè)定完畢! 按任意鍵繼續(xù)...
PAUSE >nul
GOTO start

:outtime
CLS
ECHO.
ECHO 請(qǐng)輸入倒計(jì)時(shí)秒數(shù)
ECHO ────────
ECHO (設(shè)定后要取消,單擊"確定"后按Ctrl+C鍵兩次)
SET timed=
SET /p timed=輸入:
tsshutdn %timed% /delay:0 /powerdown >nul
IF not errorlevel 1 GOTO ok
ECHO %timed% 是無(wú)效的關(guān)機(jī)時(shí)間,請(qǐng)重新輸入
ECHO.
GOTO outtime

:delAt
cls
echo.
at /del /y
echo 定時(shí)關(guān)機(jī)任務(wù)已取消,按任意鍵繼續(xù)...
pause >nul
GOTO start

:view
MODE con: COLS=85 LINES=18
COLOR 70
ECHO.
at
ECHO 按任意鍵繼續(xù)...
PAUSE >nul
GOTO start

:restart
shutdown -r -t 0

:lock
rundll32.exe user32.dll,LockWorkStation
goto start

:logoff
logoff

:end
exit



此bat文件需要Task Scheduler服務(wù)支持,我知道肯定有人不喜歡開(kāi)這服務(wù)。
畢竟魚與熊掌不可兼得,用不用隨你!ho ho 。。。。
看到有人留言說(shuō)用不了,我想可能是Terminal Services服務(wù)被禁用了吧,啟用試試!

其實(shí)用一個(gè)簡(jiǎn)單的命令也可以實(shí)現(xiàn)定時(shí)關(guān)機(jī),比如要讓電腦在23:00自動(dòng)關(guān)機(jī),只要在運(yùn)行中輸入


at 23:00 shutdown -s -f -t 3

即可實(shí)現(xiàn)定時(shí)關(guān)機(jī)

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約