Jump to content

WinXP - System Up Time: N/A


Recommended Posts

I used to type "systeminfo" to get the system up time on my Windows XP Pro Sp2 on my old system, but when I do this on my newly built system all I get is the following:

System Up Time: N/A

The old system was a WinXP Pro Sp2 on an Athlon XP 2200+ with Asus VIA KT400 mobo. The new system is the same version of WinXP Pro Sp2 from the same disk in the same configuration on a new AMD64 3700+ on an Asus A8N SLI S939 Nvidia nForce 4 SLI ATX motherboard.

I have no idea why I can't get this uptime value, other than the fact the board is new and the driver for it may not be as good as the driver for the old board....

Link to comment
Share on other sites

I only have XP Home SP2 so for some reason I don't have systeminfo.exe but I tried to look some stuff up anyway to help and found the following...

You may need to have events in your eventlog and Dr. Watson running. Try this tool instead (x86 version) HERE. Maybe for some reason this will get you something else, I don't know but its worth the copy and past - cmd /k Systeminfo | Find "Up Time".

Also, this worked for me. Just enter this in notepad, and save as a .vbs script.

thetime = uptime

wscript.echo(thetime)

function upTime()

' set the output format:

outputString = "UPTIMEDAYS days, UPTIMEHRS hrs, UPTIMEMIN min, UPTIMESEC sec"

' terms available (case matters): UPTIMEDAYS, UPTIMEHRS, UPTIMEMIN, UPTIMESEC

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")

For Each objOS in colOperatingSystems

dtmBootup = objOS.LastBootUpTime

dtmLastBootupTime = WMIDateStringToDate(dtmBootup)

dtmSystemUptime = DateDiff("s", dtmLastBootUpTime, Now)

tmpUptime = dtmSystemUptime

outputString = replace(outputString, "UPTIMEDAYS", int(tmpUptime/86400))

tmpUptime = tmpUptime - int(tmpUptime/86400)*86400

outputString = replace(outputString, "UPTIMEHRS", int(tmpUptime/3600))

tmpUptime = tmpUptime - int(tmpUptime/3600)*3600

outputString = replace(outputString, "UPTIMEMIN", int(tmpUptime/60))

tmpUptime = tmpUptime - int(tmpUptime/60)*60

outputString = replace(outputString, "UPTIMESEC", int(tmpUptime))

upTime = outputString

Next

End Function

Function WMIDateStringToDate(dtmBootup)

WMIDateStringToDate = CDate(Mid(dtmBootup, 5, 2) & "/" & Mid(dtmBootup, 7, 2) & "/" & Left(dtmBootup, 4) & " " & Mid (dtmBootup, 9, 2) & ":" & Mid(dtmBootup, 11, 2) & ":" & Mid(dtmBootup, 13, 2))

End Function

Link to comment
Share on other sites

No I didn't write the vb script. I wish I could program/script good. I'm working on it. lol. Yeah from what I read its hard to get the time because of the eventlogs, they all have to be there and you must have permissions for them, so its best to run uptime as admin. But you should be able to look at the status of your network connection icon and get about the right amount of time if there were no resets, maybe 30 secs off but close. I would guess the vb script to be more on the money but I haven't tested it. Have you?

Link to comment
Share on other sites

Yes, and the uptime.exe is way off cos the logs only go back 8 days it counts uptime as 8 days (very very dumb way of doing this which is why this tool isn't more popular I'd bet)

The vbscript says 13 days 5 hours and the network connection says 13 days 5 hours so I'm going with that figure...

where did you get the vbscript then?

Link to comment
Share on other sites

I got the script from http://techrepublic.com.com/5100-10877-5826014.html along with a lot of the info I learned about this uptime thingy. There is also another script posted in one of the replies on there site but you may have to register to get it and it only displays the uptime in days, but it also shows time since installation. You'd think there would be a better way to get the uptime.

I've been a member of that site and countless others that I seem to forget about until I need to read something in their forums or download something and when I go to register I can't with my email addy because its in use. After trying some of my common username/password combinations I find out I've been signed up for like 2 years. I'm such an idiot. That ever happen to you?

Link to comment
Share on other sites

You could just use this free tool ?

SIW - System Information for Windows - does not require installation

This program performs computer configuration analysis and diagnostics. It gives detailed information about :-

your computer properties and settings, detailed specs for CPU, motherboard, chipset, BIOS, CPU, PCI/AGP, USB and ISA/PnP devices, memory, monitor, video card, disk drives, CD/DVD devices, SCSI devices, S.M.A.R.T., ports, network cards, printers, operating system, installed programs and hotfixes, processes, services, serial numbers (CD keys), users, open files, system uptime, network, network shares, as well as real-time monitors for CPU, memory, page file usage and network traffic. It displays currently active network connections, passwords hidden behind asterisks, installed codecs, and more.

This program also creates a report file, and is able to run in batch mode.

http://www3.sympatico.ca/gtopala/about_siw.html

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy