查询计算机启动了多长时间的工具

由于要维护服务器,需要知道系统是什么时候启动的,系统有一个命令可以实现:
systeminfo
但是这个命令会打印很多东西出来,里面需要的就是一行:
系统启动时间: 0 天 0 小时 35 分 17 秒
于是写了一个DOS的批处理程序,取名字getBootTime.bat,然后在桌面放一个快捷方式“启动时间”,非常方便取得了。

以下是文件内容:
@echo off
systeminfo > d:1.txt
@echo=
find "系统启动时间" d:1.txt
del d:1.txt
@echo=
@echo=
@echo wirte by maxma@2017.4.25
@echo=
@echo=

pause

说明:上面之所以写d:,是因为Windows10(还包括之前的老系统)对C根目录有限制
原文地址:https://www.cnblogs.com/maxma/p/9169556.html