Several Uptime Gadgets stop running after 2 - 3 hours
I have run Win 7 HP 64 bit successfully for about a year now, however in the past couple of weeks an interesting little fault seems to have developed on one of my systems (a Dell XPS 420) - I have another Win 7 64 bit system which is a laptop and this does not experience the same problem! So the problem - I have downloaded a couple of Uptime gadgets to display the elapsed time since the system was booted. The first of these gadgets (from http://gallery.live.com/liveItemDetail.aspx?li=9edd60d7-5810-44b4-a72e-b3416de5758b) ran successfully for 11+ months and still runs OK on my secod system. However on the DELL XPS system it stops running after 2 - 3 hours - the time varies with each re-boot. Thinking this was perhaps a problem with the Gadget (although it does work OK on the second system) I went in search of another similar gadget and found the following (http://www.softpedia.com/get/Windows-Widgets/System-Utilities/System-Uptime-Full-II.shtml). Unfortunately this gadget exhibits the same problem. I suspect both gadgets share the same core code which is shown below in italics - would anyone know why this code might stop working after a variable (but always 2 - 3 hour) period of time? Function GetUpdateInterval UpdateInterval = 1 System.Gadget.Settings.write "UpdateInterval", UpdateInterval GetUpdateInterval = UpdateInterval * 1000 End Function Sub SetContent 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 ) intSecsRemaining = ( intSecsTotal - ( intHours * 3600 )) intSecsTotal = intSecsRemaining intMinutes = Fix( intSecsTotal / 60 ) intSeconds = ( intSecsTotal - ( intMinutes * 60 )) if (intMinutes < 10) then intMinutes = "0" & intMinutes end if if (intSeconds < 10) then intSeconds = "0" & intSeconds end if uptimeCounter.innerText = intDays & "d " & intHours & ":" & intMinutes & ":" & intSeconds setTimeout "SetContent()", GetUpdateInterval() Next End Sub 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 Windows 7 Home Premium SP1 64 Bit - Dell XPS420 6GB
March 9th, 2011 3:07pm

Hi, Please check if the following KB article helps: Windows7 Gadgets may not work or display properly If the issue persists, you may need to post a new thread in Scripting Forums for further discussion. Regards, Sabrina This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
March 10th, 2011 11:45pm

Thanks for the suggestion Sabrina. I took a look at the potential problems identified by the article but I don't seem to have either of them. Anyway I tried the fixes but they didn't resolve the problem. I tried another gadget today and it stopped counting uptime after 2 hours 24 minutes and 53 seconds - a fairly typical time. Before I go and try with a post in the Scripting Forums would you mind saying why you think it could be an issue with Scripting - to my mind (and I admit I'm no great expert) I would have thought that since the Gadget starts working OK it should continue to do so or is the script actually running continuously? just as a matter of interest the uptime figure in task manager continues to be updated. regards, BernardWindows 7 Home Premium SP1 64 Bit - Dell XPS420 6GB
March 13th, 2011 6:50pm

Hi Bernard, First, please check if the other Windows Gadgets work properly and if it is able to run on the other computers without problem. If the other Windows Gadgets work properly, it states that the Windows Gadgets settings on your computer is ok and you need to post a new thread in Scripting Forums for further discussion as this gadget is not developed by Microsoft. Regards, Sabrina This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
March 14th, 2011 2:59am

Hi Sabrina I think I may have found the solution (and cause) of my problem with the Uptime Gadgets. Today I downloaded the IE9 code released by Microsoft. Up till now I have been running the IE9 beta and then the RC. Thinking about the timing of the problem is it quite possible the problems started when I downloaded the RC. The other fact that seems to point to IE9 RC being the cause of the problem is that on my other machine (a laptop also running Win 64 SP1) I still have IE8 and I have had no problem with the Uptime gadgets on this machine. Right now the system has been booted over 9 hours since the update and the Uptime Gadget is working perfectly. Seems like Microsoft introduced some sort of problem with the IE9 RC which caused the gadget to stop after 2 - 3 hours - maybe some small memory leak or who knows what. Anyway right now its looking good. Interestingly enough my system seems to be much more stable in its use of memory (6GB actual and using around 2.7GB) than before when it used to start off around this fugure and climb to 5GB over a day or two. Anyway thanks for your interest and I thought you might like to know the problem may have been resolved. regards, Bernard Windows 7 Home Premium SP1 64 Bit - Dell XPS420 6GB
March 15th, 2011 3:55pm

Hi, Thank you for updating the status of our issue. I am glad to hear that the root cause was found. After sharing your experience you can help other community members facing similar problems. Regards, Sabrina This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
March 15th, 2011 11:50pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics