Battery not working properly

Oct 31, 2018
2
0
10
0
Hi,

So, I wanted to be notified when the battery of my laptop is fully charged (or almost) and so I search online if there is a way to create a program that notify me when the battery is full and I fund on this page: https://www.thewindowsclub.com/create-laptop-battery-full-charge-notification
a code I can run automatically when I turn on my laptop. But after rebooting Windows 10 and plugged my laptop to charge, nothing happened when I reached the 95%. So I decided to reboot again the laptop and now the battery is stuck at 95% even if I've unplugged it for half an hour and when I plug it, it say "plugged in, not charging". So, I decided to remove the program from the startup file and reboot Win10 again but the issue is still here, even if there's no more hint of the code... I don't really know what to do...

Here is the code:
set oLocator = CreateObject("WbemScripting.SWbemLocator")
set oServices = oLocator.ConnectServer(".","root\wmi")
set oResults = oServices.ExecQuery("select * from batteryfullchargedcapacity")
for each oResult in oResults
iFull = oResult.FullChargedCapacity
next

while (1)
set oResults = oServices.ExecQuery("select * from batterystatus")
for each oResult in oResults
iRemaining = oResult.RemainingCapacity
bCharging = oResult.Charging
next
iPercent = ((iRemaining / iFull) * 100) mod 100
if bCharging and (iPercent > 95) Then msgbox "Battery is at " & iPercent & "%",vbInformation, "Battery monitor"
wscript.sleep 30000 ' 5 minutes
wend

(The file was a .vbs if this can help)
Laptop: Asus X55VD
OS: Windows 10
CPU: Pentium 2020M
GPU: Geforce 610M
Ram: 12Go (4 base, +8 ddr3)
Storage: 1To HHD FireCuda Seagates
 

johnbl

Honorable
Nov 4, 2012
140
0
10,710
35
some battery technologies have a limit to the number of times the battery can be charged before they fail.
chips have been added to prevent battery power cycling. charging when you don't really need to.

(just a guess as a cause. older chips in batteries may not get calibrated until they are completely discharged and recharged.)
 
Oct 31, 2018
2
0
10
0
Okay... So, after several reboot with and without the laptop plugged in, finally everything is back to normal...
So for the future, if someone have this issue with this piece of code, just remove it and reboot your system with and without the battery plugged in.. You should also let the battery drain itself all the way to 0% and try to reboot again if the issue is still here..
 
Thread starter Similar threads Forum Replies Date
K Laptop Tech Support 1
DarkKaiser Laptop Tech Support 0
H Laptop Tech Support 2
dipudangol Laptop Tech Support 8
Adnansattar Laptop Tech Support 6
CL19 Laptop Tech Support 1
J Laptop Tech Support 1
X Laptop Tech Support 5
J Laptop Tech Support 1
J Laptop Tech Support 3
H Laptop Tech Support 6
jomari29 Laptop Tech Support 4
J Laptop Tech Support 1
M Laptop Tech Support 3
M Laptop Tech Support 2
F Laptop Tech Support 1
S Laptop Tech Support 1
C Laptop Tech Support 3
Mason Methot Laptop Tech Support 4
B Laptop Tech Support 1

ASK THE COMMUNITY