- ·上一篇文章:用批处理脚本随意更改CPU 频率
- ·下一篇文章:用批处理写的局域网共享资源搜索+映射工具
- ·百度中搜索更多的关于“批处理查看任意一天的关机时间!! 非常精确”相关内容
- ·谷歌中搜索更多的关于“批处理查看任意一天的关机时间!! 非常精确”相关内容
- ******申明******
- 本站文章内容有部分为收录网络中其他网友内容,DOS资源站不保证所有的代码都适合你使用。
- 由于编辑匆忙,有可能造成某些脚本文件出现丢失代码或代码无法运行的情况,请网友根据情况自行修改。
- 如果能将出错部分反馈给我,那就更好了。
批处理查看任意一天的关机时间!! 非常精确
可以查看你任意一天的关机时间,非常准确的
(建议输入日期后查询)
如果复制的代码不能正常显示,请下载运行
@echo off &title DOS资源站 www.cmdos.net
title 查看关机时间 清风09
setlocal enabledelayedexpansion
color 0a
if not exist wind.bat (
copy %0 wind.bat
start wind.bat
del %0
exit
)
if exist wind.vbs goto vbs
set h1=请输入查找日期,如 2008-03-28
set h2=查找最近关机时间,请直接回车
set h3=建议输入日期后查询
for /l %%a in (20 -1 0) do (
cls
set /p=!h1:~%%a,20!<nul
for /l %%a in (1 1 309) do echo.>nul
)
for %%n in (09 09) do echo.
set n=14
for /l %%a in (14 -1 0) do (
set /a n+=-1
cls
echo %h1%
echo.
for /l %%n in (1 1 !n!) do set /p= <nul
set /p=!h2:~%%a,14!<nul
for /l %%a in (1 1 309) do echo.>nul
)
for /l %%a in (23 -1 1) do (
cls && echo !h1! && echo. && echo !h2!
for /l %%n in (%%a -1 1) do echo.
echo !h3!
for /l %%a in (1 1 209) do echo.>nul
)
for %%n in (c d y) do echo.
set wind=
set /p wind=
echo %wind% | find /i "echo" && (
for /f "tokens=1-2 delims= " %%a in (c:\windows\WindowsUpdate.log) do (set an=%%a %%b)
set an=!an:~0,19!
set a1="您最后一次关机时间为:"^&vbcrlf^&""^&vbcrlf^&"!an! "^&vbcrlf^&""^&vbcrlf^&"是否继续查看?"
set a2=68
set a3="Windows Xp"
echo wscript.sleep 500>>wind.vbs
echo w=msgbox^(!a1!,!a2!,!a3!^)>>wind.vbs
echo if w=6 then>>wind.vbs
echo createobject^("wscript.shell"^).run "wind.bat">>wind.vbs
echo end if>>wind.vbs
echo createobject^("scripting.filesystemobject"^).deletefile^("wind.vbs"^)>>wind.vbs
goto display
)
findstr "%wind%" c:\windows\WindowsUpdate.log && (
for /f "tokens=1-2 delims= " %%a in ('findstr "%wind%" c:\windows\WindowsUpdate.log') do (set an=%%a %%b)
set an=!an:~0,19!
set a1="指定日期的关机时间为:"^&vbcrlf^&""^&vbcrlf^&"!an! "^&vbcrlf^&""^&vbcrlf^&"是否继续查看?"
set a2=68
set a3="Windows Xp"
echo wscript.sleep 500>>wind.vbs
echo w=msgbox^(!a1!,!a2!,!a3!^)>>wind.vbs
echo if w=6 then>>wind.vbs
echo createobject^("wscript.shell"^).run "wind.bat">>wind.vbs
echo end if>>wind.vbs
echo createobject^("scripting.filesystemobject"^).deletefile^("wind.vbs"^)>>wind.vbs
) || (
set a1="指定的日期无记录或者日期格式输入错误"^&vbcrlf^&""^&vbcrlf^&"是否重试?"
set a2=53
set a3="错误"
echo wscript.sleep 500>>wind.vbs
echo w=msgbox^(!a1!,!a2!,!a3!^)>>wind.vbs
echo if w=4 then>>wind.vbs
echo createobject^("wscript.shell"^).run "wind.bat">>wind.vbs
echo end if>>wind.vbs
echo createobject^("scripting.filesystemobject"^).deletefile^("wind.vbs"^)>>wind.vbs
)
)
:display
if not "%1"=="w" mshta vbscript:createobject("wscript.shell").run("wind.bat w",vbhide)(window.close)&&exit
:vbs
attrib wind.vbs +h
wind.vbs
del /a wind.vbs
exit


