Saturday, January 04, 2003

Finding System Uptime of Windows XP Professional machine

Today I wanted to find out the total Uptime of my Windows XP Pro machine. Found out that there is a systeminfo command line tool that among other things give you the System Up Time info. Here's a batch file script that you can put down quickly to just extract the System Up Time using the systeminfo command line tool.


@systeminfo | @find "System Up Time:"
@pause

Better still, just download this Uptime.exe and run it on your XP Pro machine. Don't worry about what the System Requirements section says, it runs just fine on XP Pro. Here's the output:

D:\>uptime
\\DM has been up for: 0 day(s), 5 hour(s), 29 minute(s), 54 second(s)

Try the uptime /s switch for some really cool stats.

No comments: