If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Applet to record battery strength every 30 minutes
Where could I get an applet that would wake up every 30 minutes, read
the battery strength on my laptop, and write the results to a file? I looked at several shareware apps that monitor the battery, but didn't see any that can make a log. Any suggestions or pointers? |
Ads |
#2
|
|||
|
|||
Applet to record battery strength every 30 minutes
"Prof Wonmug" wrote in message ... Where could I get an applet that would wake up every 30 minutes, read the battery strength on my laptop, and write the results to a file? I looked at several shareware apps that monitor the battery, but didn't see any that can make a log. Any suggestions or pointers? "And your question about Windows XP is....?" |
#3
|
|||
|
|||
Applet to record battery strength every 30 minutes
"Prof Wonmug" wrote in message ... Where could I get an applet that would wake up every 30 minutes, read the battery strength on my laptop, and write the results to a file? I looked at several shareware apps that monitor the battery, but didn't see any that can make a log. Any suggestions or pointers? "And your question about Windows XP is....?" |
#4
|
|||
|
|||
Applet to record battery strength every 30 minutes
"Prof Wonmug" wrote in message ... Where could I get an applet that would wake up every 30 minutes, read the battery strength on my laptop, and write the results to a file? I looked at several shareware apps that monitor the battery, but didn't see any that can make a log. Any suggestions or pointers? You could do it like this: 1. Save the code below as c:\Windows\BatteryMonitor.vbs 2. Create a scheduled task that runs once every 30 minutes. It should execute the following command: cscript //nologo c:\Windows\BatteryMonitor.vbs c:\Windows\BatteryMonitor.log 3. Examine the log file c:\Windows\BatteryMonitor.log Note that the battery interface appears to differ somewhat between manufacturers. The code works on my Acer laptop but it may fail on your own machine. Set oWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set cItems = oWMIService.ExecQuery( _ "SELECT * FROM Win32_Battery",,48) For Each oItem In cItems sOutput = Date() & " " & Time() & ": " _ & "Remaining charge=" & oItem.EstimatedChargeRemaining & "%" If oItem.BatteryStatus = 1 _ Then sOutput = sOutput & ", Remaining time=" & oItem.EstimatedRunTime & " minutes" WScript.Echo sOutput Next |
#5
|
|||
|
|||
Applet to record battery strength every 30 minutes
"Prof Wonmug" wrote in message ... Where could I get an applet that would wake up every 30 minutes, read the battery strength on my laptop, and write the results to a file? I looked at several shareware apps that monitor the battery, but didn't see any that can make a log. Any suggestions or pointers? You could do it like this: 1. Save the code below as c:\Windows\BatteryMonitor.vbs 2. Create a scheduled task that runs once every 30 minutes. It should execute the following command: cscript //nologo c:\Windows\BatteryMonitor.vbs c:\Windows\BatteryMonitor.log 3. Examine the log file c:\Windows\BatteryMonitor.log Note that the battery interface appears to differ somewhat between manufacturers. The code works on my Acer laptop but it may fail on your own machine. Set oWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set cItems = oWMIService.ExecQuery( _ "SELECT * FROM Win32_Battery",,48) For Each oItem In cItems sOutput = Date() & " " & Time() & ": " _ & "Remaining charge=" & oItem.EstimatedChargeRemaining & "%" If oItem.BatteryStatus = 1 _ Then sOutput = sOutput & ", Remaining time=" & oItem.EstimatedRunTime & " minutes" WScript.Echo sOutput Next |
#6
|
|||
|
|||
Applet to record battery strength every 30 minutes
Olórin wrote:
"Prof Wonmug" wrote in message ... Where could I get an applet that would wake up every 30 minutes, read the battery strength on my laptop, and write the results to a file? I looked at several shareware apps that monitor the battery, but didn't see any that can make a log. Any suggestions or pointers? "And your question about Windows XP is....?" --------------------- If you look at Pegasus's reply, you will realise it is also about ppl helping ppl. Ed |
#7
|
|||
|
|||
Applet to record battery strength every 30 minutes
Olórin wrote:
"Prof Wonmug" wrote in message ... Where could I get an applet that would wake up every 30 minutes, read the battery strength on my laptop, and write the results to a file? I looked at several shareware apps that monitor the battery, but didn't see any that can make a log. Any suggestions or pointers? "And your question about Windows XP is....?" --------------------- If you look at Pegasus's reply, you will realise it is also about ppl helping ppl. Ed |
Thread Tools | |
Display Modes | |
|
|