In this article, I explain you to How to get full battery notification in Windows 10? In Windows 10, Microsoft gives us the facility to set Two types of Battery Notification. The first one is Low Battery Notification while the other one is Critical Battery Notification. You can set these both by going to the below location.
Control Panel>Hardware and Sound>Power Options>Edit Plan Settings>Change Advance Power Settings>Battery
As you can see Microsoft has not give us an option for Full Battery Notification. So, How do we set a full battery Notification in Windows 10? Well, you can do so by creating a Visual Basic Script file in you Notepad. You should thank John Howard, the Senior Program Manager, Hyper-V team, Windows Core Operating System Division, you actually write the code for all of us.
How to Get Full Notification in Windows 10?
The very first thing you have to do is copy paste the below code in a new Notepad file with the name anyname.vbs.
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
Note: The Above code gives you a full battery notification when your Battery Percentage crosses 95% charging. You can set any value by changing in iPercent > 95.
After creating the file copy and paste it in the Windows 10 Startup folder. You can open the startup folder by pressing WIN+R key. Then type the shell:startup and press enter.
Benefit of Getting Full Battery Notification in Windows 10
First you save some electricity by getting a reminder to Turn off your Charger. Second, overcharging a battery decreases its life-span (as excessive charging destroying the charge storing cells). Third, Laptop battery costs are Higher. Therefore, why not give this method a kick.
Read also: How to Calibrate PC or SmartPhones Battery? (Guide)
Hi Sanjay,
Is there any way to modify the code, in order to get the notification with sound or voice that I’ve created, instead of just message box?
Thanks.
Well, that didn’t work. Got a compile error when run.
You have to re-type all the double quotes, and the sole single quote at the bottom of the script (after the 30000).
Fwindows script host gives many errors. 1. double quotes are not recognised, used keypad default ok.
2. Invalid naespace SWbemLocator.
Please dont use above code.. it puts laptop to mode when power doesnt switch off automatically [power light stays after shut down], later we need to press and close the shutdown process…!!!
Hi Shalu,
I am using this code for the past 2 years and it doesn’t give me a single issue.
The problem you described above occurs due to some other conflict.
Have you checked it correctly?
Regards,
Sanjay
A little bit late to the party on this one, but is it possible to make the message box show on top of anything you might have open? I use fullscreen for long periods of time and I only see the the script flashing on the taskbar after I quit fullscreen
iam not getting any message can someone please help me out