PDA

Click to See Complete Forum and Search --> : How do I find System Up Time of a WinNT 4.0


tarrantm
Jan 18th, 2000, 09:13 PM
machine using VB?
This is assuming performance monitoring is not enabled. I know in Win2K there is a performance monitor registry key that has all this info..

Clunietp
Jan 19th, 2000, 12:23 PM
the GetTickCount API will return the number of milliseconds that Windows has been running. Just do your math from there!

tarrantm
Jan 20th, 2000, 03:56 AM
I know that.. but that's only valid for 49.7 days... after which it goes back to 0... and I certainly hope our servers stay up for longer than that :)

Aaron Young
Jan 20th, 2000, 04:49 AM
You could write a very simple program which when run at Windows Startup will Make a Registry Entry Marking the Current Date and Time, then at any time you can check this Value in the Registry and calculate your Up Time with no Time Limitation.

I figured something like this was probably already being done, but couldn't find an entry in the Registry.

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
ajyoung@pressenter.com