The problem is with system uptime. it shows a big negative number, even though I restated earlier today.
Actually it seems to work fine on a computer running 32-bit Windows 7... But how do i fix this?
UpdateInterval = 1
System.Gadget.Settings.write "UpdateInterval", UpdateInterval
GetUpdateInterval = UpdateInterval * 1000
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objLocator.ConnectServer(MachineName, "root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOS in colOperatingSystems
dtmBootup = objOS.LastBootUpTime
dtmLastBootupTime = WMIDateStringToDate(dtmBootup)
dtmSystemUptimeSecs = DateDiff("s", dtmLastBootUpTime, Now)
intSecsTotal = dtmSystemUptimeSecs
intDays = Fix( intSecsTotal / 86400 )
intSecsRemaining = ( intSecsTotal - ( intDays * 86400 ))
intSecsTotal = intSecsRemaining
intHours = Fix( intSecsTotal / 3600 )
intSecsTotal = ( intSecsTotal - ( intHours * 3600 ))
intMinutes = Fix( intSecsTotal / 60 )
uptimeTxt.innerText = intDays & " days " & intHours & " hours " & intMinutes & " minutes"
setTimeout "uptime()", GetUpdateInterval()
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))
Attached is the Gadget itself.