Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Determine Last Restart Date

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
I want to build a VB app that will display several pieces of information about any NT/2000 server the user selects.

Does anyone have any ideas as to the best way to determine the date/time of the last reboot of the server?

I'm thinking of checking Last Modified date of the Pagefile.sys That gets reset with every restart. problem is it can be on any drive, not necesarily alway on C.

Don't think I can read the Event Logs in VB....?

Thanks for any ideas.. no matter how wild :)
John
 
You can use the timeGetTime API to obtain that information.

Public Declare Function timeGetTime Lib "winmm.dll" () As Long

MsgBox timeGetTime() -> Number of milliseconds since Windows was started.


Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top