上班和下班自動記錄開關機時間腳本
@ECHO OFF www.2cto.com
set a=%date:~0,10%
set b=%time:~0,8%
if "%1" == "s" goto s
if "%1" == "e" goto e
exit
:s
echo --------------------------------------------- >> E:\shangban.txt
echo 登錄時間:%a% %b% >> E:\shangban.txt www.2cto.com
exit
:e
echo 退出時間:%a% %b% >> E:\shangban.txt
echo --------------------------------------------- >> E:\shangban.txt
exit
:: echo 今天登錄時間:%a% %b% >> E:\shangban.txt
:: gpedit.msc 計算機配置 ->Window 配置 ->角本 ->啟動|關機