Hi,
I'm looking for a way to calculate the amount of time that Windows has
been running since the last boot. Ideally I'd like to be able to create
a DateTime object containing this value so that I can format it however
I like.
I've so far found a program called "uptime.exe " which is supplied by
Microsoft on their website, but it outputs the uptime value as a string
in the format "\\FRED has been up for: 5 day(s), 1 hour(s), 30
minute(s), 3 second(s)", which isn't of much use to me as it stands.
Is there a way of doing this in C#, or perhaps some method of running
"uptime.exe " and parsing the output to create a DateTime object?
Cheers,
--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references