Tuesday, January 31, 2017

Unix has a useful command named 'uptime'.  Of course, it tells you how long your computer has been running. 

Windows doesn't have that command per se though it does have various ways to get the same info.  But I don't want to use those, I just want 'uptime'.  I used to have a binary .exe that did that, but no more.

This workaround gets you pretty much there:
  1. download PsTools.
  2. from the zip, you could just run psinfo.  It gives you several pieces of information including the uptime.
  3. or if you really want to be pedantic about it, create a one-line script with this command very carefully typed: 
echo @psinfo ^| find "Uptime:" > uptime.cmd

That should get you a one-line script that runs "psinfo", but only displays the uptime line.

Furry cows moo and decompress.

No comments:

Post a Comment