set /p RESTART= WOULD YOU LIKE TO RESTART YOUR COMPUTER NOW?(Y/N):
echo.
if %RESTART%==Y (
echo.
echo.
echo YOUR COMPUTER WILL BE REBOOTED IN 30 SECONDS!!!
shutdown.exe /r /t 30
goto Ryes
) else (
echo.
echo.
echo YOU CHOSE NOT TO RESTART YOUR COMPUTER.
echo.
echo *****REMEMBER THAT YOU STILL NEED TO RESTART YOUR COMPUTER SO THE CHANGES CAN BE APPLIED! *****
)
:Ryes
echo.
set /p ABORT= WOULD YOU LIKE TO ABORT THE REBOOT?(Y/N):
echo.
:A
shutdown /a
pause
「您選擇不重新啓動計算機」的消息仍然出現,如果我鍵入Y.關機命令行和郵件問題
關機命令不工作,我運行.bat爲管理員。 嘗試了Windows XP和最新的Windows版本。
我輸入y不是Y,但我不認爲這是問題,因爲其他用戶輸入選擇工作只是罰款大小寫。 都關機命令:
shutdown -r -f -t 30
shutdown.exe /r /t 30
我知道,因爲我在嘗試使用中止選項時,這條消息:
Unable to abort the system shutdown because no shutdown was in progress.(1116)
Press any key to continue . . .
什麼是我的批處理文件的問題?
謝謝你的所有幫助和時間。
您輸入'Y'而不是'y',對不對? – SomethingDark