Using standard commands, I have scripted WhenStarted.bat to return the date and time that your computer was last started.
The syntax for using WhenStarted.bat is:
WhenStarted Date Time
Where:
DATE is a call directed environment variable that will contain the date your computer was started, using your short date format. Time is a call directed environment variable that will contain the time your computer was started.WhenStarted.bat contains:
@echo off if \{%2\}==\{\} @echo WhenStarted Date Time&goto :EOF for /f "Tokens=3,4" %%a in ('net statistics server^|Find "Statistics since"') do ( set %1=%%a set %2=%%b )
0 comments
Hide comments