自動關機的 bat 代碼問題 - Windows
By Daniel
at 2011-09-16T08:44
at 2011-09-16T08:44
Table of Contents
我照著某個網頁上寫的自動關機 bat 代碼做修改
(把簡體改繁體及去掉一些無關內容)
在 Windows XP SP3 上面無法正常執行
請問哪裡有問題呢? 感謝回答
//////////////////////////////////////////////////////////////
@echo off
title 關機命令
cls
echo -----------------------------------------
echo 現在時刻:%date% %time%
echo -----------------------------------------
color 0a
echo 輔助說明:"g" 自動關機 "q" 取消自動關機 "exit" 離開
set /p cmd = 請輸入操作命令:
if "%cmd%" equ "g" goto g
if "%cmd%" equ "q" goto q
if "%cmd%" equ "exit" goto exit
:g
set /p gtime= 請輸入延遲自動關機時間(分鐘):
set /a gt=%gtime%*60
shutdown.exe -s -t %gt%
pause
goto end
:q
shutdown.exe -a
pause
goto end
:exit
exit
goto end
///////////////////////////////////////////////////////////////
--
(把簡體改繁體及去掉一些無關內容)
在 Windows XP SP3 上面無法正常執行
請問哪裡有問題呢? 感謝回答
//////////////////////////////////////////////////////////////
@echo off
title 關機命令
cls
echo -----------------------------------------
echo 現在時刻:%date% %time%
echo -----------------------------------------
color 0a
echo 輔助說明:"g" 自動關機 "q" 取消自動關機 "exit" 離開
set /p cmd = 請輸入操作命令:
if "%cmd%" equ "g" goto g
if "%cmd%" equ "q" goto q
if "%cmd%" equ "exit" goto exit
:g
set /p gtime= 請輸入延遲自動關機時間(分鐘):
set /a gt=%gtime%*60
shutdown.exe -s -t %gt%
pause
goto end
:q
shutdown.exe -a
pause
goto end
:exit
exit
goto end
///////////////////////////////////////////////////////////////
--
Tags:
Windows
All Comments
By Elma
at 2011-09-18T22:58
at 2011-09-18T22:58
By Joseph
at 2011-09-21T21:11
at 2011-09-21T21:11
Related Posts
windows該如何手動關掉喇叭用耳機聽聲音呢?
By Aaliyah
at 2011-09-16T07:18
at 2011-09-16T07:18
Windows 8開發者版本搶先看
By Candice
at 2011-09-16T03:21
at 2011-09-16T03:21
帳戶權限問題
By Quanna
at 2011-09-15T19:42
at 2011-09-15T19:42
帳戶權限問題
By Puput
at 2011-09-15T19:06
at 2011-09-15T19:06
WIN7 DHCP網路無法外連?
By Oscar
at 2011-09-15T18:28
at 2011-09-15T18:28