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
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

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