• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

how long it has been since the last boot?

how can i check how long my computer was on since the last restart(boot)
refer to winnt win98 win2000
0
mustaki
Asked:
mustaki
  • 2
1 Solution
 
OttaCommented:
Add the line:

@ECHO mustaki > C:\BOOT.DAT

to the 'AUTOEXEC.BAT' (Win95/Win98)
to write that string to that file.

Then 'DIR mustaki' will give the date/time at which the file was written.

For NT4/5, bury this line in a '.BAT' file, and run this '.BAT' file from the "Startup" folder.
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
For NT, you can use unix like freeware utilities (these may also work with 9x) called "Uptime".  Further, on NT/2000 you can type "Net statistics workstation" or "net statistics server" - this will tell you the last time the Workstation (or server) service started.  If you had to restart the service(s), then this will be inaccurate, but it's rare that you restart these services, so they should suffice.
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
The suggestion for NT4/2000 will only work if you log in to the computer thus for NT, you are not getting an accurate reading.  Further, it will rewrite the file every time you log in, so if you log in then logout as you go to lunch then come back, the new file info will claim it's been up since you returned from lunch.  Whereas using Net Statistics, you are getting the actual time since the service started
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now