Re: Getting system uptime on Windows
- From: walton.paul@xxxxxxxxx
- Date: 29 Nov 2005 06:26:58 -0800
I was able to capture the output by first writing the command to a
batch file and then using exec on the .bat file.
set token [open uptime.bat w]
puts $token "net statistics server"
close $token
set data [exec uptime.bat]
file delete uptime.bat
And then it´s just a matter of parsing the output to get the last boot
time. But if anyone else uses this method, be advised that the output
is in the user´s preferred language, so some fancy parsing is required
to be international.
Also, I don´t think this command is available on Windows 98.
.
- References:
- Getting system uptime on Windows
- From: walton . paul
- Re: Getting system uptime on Windows
- From: walton . paul
- Getting system uptime on Windows
- Prev by Date: Re: tbcload for 8.5
- Next by Date: Re: The latest Tcl85 failed to load extensions that were linked to the tcl85 and tk85.lib
- Previous by thread: Re: Getting system uptime on Windows
- Next by thread: Re: Getting system uptime on Windows
- Index(es):
Relevant Pages
|