TRC is primarily funded by ad revenue. If you like the content you find here, please do not block our ads. Thank you.
Results 1 to 13 of 13
Like Tree4Likes
  • 1 Post By CoolHands
  • 2 Post By Derek Badger
  • 1 Post By mrlongbeard

How can I get a 'process' to keep running to test battery?

I have bought a new laptop battery. Win xp sp3. I want to give it a task to do continuously to see how long the ...

  1. #1
    Should Get Out More
    Join Date
    Dec 2007
    Posts
    6,557
    Liked
    293 times

    Default How can I get a 'process' to keep running to test battery?

    I have bought a new laptop battery. Win xp sp3. I want to give it a task to do continuously to see how long the old battery lasts, and the new one. ie. to be able to compare them.

    I don't particularly want to install new software if I can avoid it.

    tanks
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!


  2. TRC is primarily funded by ad revenue. If you like the content you find here, please do not block our ads. Thank you.
  3. #2
    Toolaholic go_slow's Avatar
    Join Date
    Dec 2007
    Location
    is not fixed no more.
    Posts
    13,388
    Liked
    3873 times
    Blog Entries
    19

    Default Re: How can I get a 'process' to keep running to test battery?

    You'll need some type of software even if you write it yourself, the current battery level is a system value, you'll need some way to read this and then write it somewhere so you can then look at the data.

    This is a simple example for Windows 7
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  4. #3
    needs more cowbell Derek Badger's Avatar
    Join Date
    Dec 2007
    Posts
    24,229
    Liked
    3324 times

    Default Re: How can I get a 'process' to keep running to test battery?

    WMI can query the battery status. not on a laptop at present, so can't test it but if you save the code below as a .vbs file and use cscript to execute it.

    Battery properties, queried by a WMI script by Roby Kott

    Code:
                     '************************************** ' Name: Battery properties, queried by a WMI script ' Description:WMI script to show how to query battery info using VBScript and WMI ' By: Roby Kott ' 'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=8092&lngWId=4'for details.'**************************************  ' **************************************************************************** ' This function lists battery info of a (remote) computer ' **************************************************************************** ' Goto http://www.activxperts.com/activmonitor and click on WMI Samples ' for more samples ' **************************************************************************** Sub ListBatteryInfo( strComputer ) Dim objWMIService, colItems     Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")     Set colItems = objWMIService.ExecQuery("Select * from Win32_Battery",,48)     For Each objItem in colItems     Wscript.Echo "Availability: " & objItem.Availability     Wscript.Echo "BatteryRechargeTime: " & objItem.BatteryRechargeTime     Wscript.Echo "BatteryStatus: " & objItem.BatteryStatus     Wscript.Echo "Caption: " & objItem.Caption     Wscript.Echo "Chemistry: " & objItem.Chemistry     Wscript.Echo "ConfigManagerErrorCode: " & objItem.ConfigManagerErrorCode     Wscript.Echo "ConfigManagerUserConfig: " & objItem.ConfigManagerUserConfig     Wscript.Echo "CreationClassName: " & objItem.CreationClassName     Wscript.Echo "Description: " & objItem.Description     Wscript.Echo "DesignCapacity: " & objItem.DesignCapacity     Wscript.Echo "DesignVoltage: " & objItem.DesignVoltage     Wscript.Echo "DeviceID: " & objItem.DeviceID     Wscript.Echo "ErrorCleared: " & objItem.ErrorCleared     Wscript.Echo "ErrorDescription: " & objItem.ErrorDescription     Wscript.Echo "EstimatedChargeRemaining: " & objItem.EstimatedChargeRemaining     Wscript.Echo "EstimatedRunTime: " & objItem.EstimatedRunTime     Wscript.Echo "ExpectedBatteryLife: " & objItem.ExpectedBatteryLife     Wscript.Echo "ExpectedLife: " & objItem.ExpectedLife     Wscript.Echo "FullChargeCapacity: " & objItem.FullChargeCapacity     Wscript.Echo "InstallDate: " & objItem.InstallDate     Wscript.Echo "LastErrorCode: " & objItem.LastErrorCode     Wscript.Echo "MaxRechargeTime: " & objItem.MaxRechargeTime     Wscript.Echo "Name: " & objItem.Name     Wscript.Echo "PNPDeviceID: " & objItem.PNPDeviceID     Wscript.Echo "PowerManagementCapabilities: " & objItem.PowerManagementCapabilities     Wscript.Echo "PowerManagementSupported: " & objItem.PowerManagementSupported     Wscript.Echo "SmartBatteryVersion: " & objItem.SmartBatteryVersion     Wscript.Echo "Status: " & objItem.Status     Wscript.Echo "StatusInfo: " & objItem.StatusInfo     Wscript.Echo "SystemCreationClassName: " & objItem.SystemCreationClassName     Wscript.Echo "SystemName: " & objItem.SystemName     Wscript.Echo "TimeOnBattery: " & objItem.TimeOnBattery     Wscript.Echo "TimeToFullCharge: " & objItem.TimeToFullCharge     Next End Sub ' **************************************************************************** ' Main ' **************************************************************************** Dim strComputer Do strComputer = inputbox( "Please enter a computername or . for local computer", "Input" ) Loop until strComputer <> "" ListBatteryInfo( strComputer ) WScript.Echo( "For more samples, goto http://www.activxperts.com/activmonitor and click" ) WScript.Echo( "On WMI samples" )
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  5. #4
    Should Get Out More
    Join Date
    Dec 2007
    Posts
    6,557
    Liked
    293 times

    Default Re: How can I get a 'process' to keep running to test battery?

    thanks. I was just going to 'test' it by charging it up, and then timing how long until the computer conked out! The original battery is pretty knackered and last's less than an hour. I will check the links ta
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  6. #5
    Really Bored abssorb's Avatar
    Join Date
    Mar 2008
    Location
    Warwickshire
    Posts
    2,001
    Liked
    254 times

    Default Re: How can I get a 'process' to keep running to test battery?

    Just halt it at the bios screen.
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  7. #6
    Should Get Out More
    Join Date
    Dec 2007
    Posts
    6,557
    Liked
    293 times

    Default Re: How can I get a 'process' to keep running to test battery?

    Quote Originally Posted by abssorb View Post
    Just halt it at the bios screen.
    I have no idea what you just said.










    ( that's my level of competence)
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  8. #7
    needs more cowbell Derek Badger's Avatar
    Join Date
    Dec 2007
    Posts
    24,229
    Liked
    3324 times

    Default Re: How can I get a 'process' to keep running to test battery?

    Quote Originally Posted by CoolHands View Post
    I have no idea what you just said.










    ( that's my level of competence)
    good luck getting that wmi query to run as a scheduled task...
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  9. #8
    Should Get Out More Editor's Avatar
    Join Date
    Dec 2007
    Location
    Robin Hood's doghouse.
    Posts
    17,553
    Liked
    1305 times
    Blog Entries
    27

    Default Re: How can I get a 'process' to keep running to test battery?

    Quote Originally Posted by CoolHands View Post
    thanks. I was just going to 'test' it by charging it up, and then timing how long until the computer conked out! The original battery is pretty knackered and last's less than an hour. I will check the links ta
    that's what I'd do!

    If it turns out to be a good one, how much & where from please? Actually, name & shame if it's a dud too.
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  10. #9
    Toolaholic go_slow's Avatar
    Join Date
    Dec 2007
    Location
    is not fixed no more.
    Posts
    13,388
    Liked
    3873 times
    Blog Entries
    19

    Default Re: How can I get a 'process' to keep running to test battery?

    Quote Originally Posted by CoolHands View Post
    I have no idea what you just said.

    ( that's my level of competence)
    Ahhh, right. What he means is that you want to get a consistent measure.

    1) Charge the battery with the laptop off.
    2) When you power up the laptop you should see the start up screen (the very very first one) and on there will be a function key you can press to "access bios". Press that function key and it will take you to a bios screen.
    3) Unplug the charger and start your clock.

    Measuring it this way means the laptop is not trying to do anything i.e. use the hard drive so you can get a consistent measure, if you let the laptop boot into windows then you cannot be sure if it hit the hard drive the same amount this time as it did last time, if it went into screen saver at the same time etc. etc.
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  11. #10
    Should Get Out More
    Join Date
    Dec 2007
    Posts
    6,557
    Liked
    293 times

    Default Re: How can I get a 'process' to keep running to test battery?

    got it. What about memtest or something (that I've used in the distant past on my pc). If I just leave it on bios screen I could be here all week! thats why i wanted something to give the computer to do.
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  12. #11
    Should Get Out More mrlongbeard's Avatar
    Join Date
    Jan 2008
    Location
    Middle of nowhere
    Posts
    7,901
    Liked
    953 times
    Blog Entries
    13

    Default Re: How can I get a 'process' to keep running to test battery?

    Simplest way, stick a dvd in it and let it play until the old battery gives up the ghost, repeat as needed for the new battery.
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  13. #12
    Should Get Out More mrlongbeard's Avatar
    Join Date
    Jan 2008
    Location
    Middle of nowhere
    Posts
    7,901
    Liked
    953 times
    Blog Entries
    13

    Default Re: How can I get a 'process' to keep running to test battery?

    Or if you've got the time, go to chrome webstore, download angry birds (free) and sit playing until battery goes kaput.

    AB not your thing? go and play quake live online (free) QUAKE LIVE
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

  14. #13
    Really Bored Nique's Avatar
    Join Date
    Jan 2008
    Posts
    2,087
    Liked
    156 times

    Default Re: How can I get a 'process' to keep running to test battery?

    Quote Originally Posted by mrlongbeard View Post
    Or if you've got the time, go to chrome webstore, download angry birds (free) and sit playing until battery goes kaput.

    AB not your thing? go and play quake live online (free) QUAKE LIVE

    Best response so far I reckons
    Register to join this UK Motorbike Forum, start a motorbike blog, or use our free motorbike classifieds!

Go Back to Forum My Forum