The Windows system on laptops issues a notification as soon as the battery level drops below 20% so that the user can connect the charger to the device to prevent it from suddenly shutting down. However, it does not do the same when the battery is fully charged at 100%. Leaving the charger connected to the device continuously while working on it reduces the battery life due to increased heat, as explained in detail in the article “Should We Keep the Laptop Charger Connected Continuously?” Since Windows does not have an option to alert when the laptop battery is fully charged, we will review below how to enable this without using any software and in a very easy way.
All we need to do now is create a script file consisting of some commands and codes that create a notification when the battery reaches a certain charge percentage, such as 95% or 100% as desired. This script works in the background continuously to monitor the battery charge percentage, and it will remove the charger from the device when this notification appears to preserve the laptop battery life. These steps can be applied to any Windows system, whether XP or Windows 10. Okay, let’s start listing the steps in the next lines.
You may also be interested in: Steps to determine whether the laptop charger and battery are original or counterfeit
To create the script, you will first open Notepad in Windows by using the Start menu or by opening the Run window by pressing Windows + R together, then typing the command “notepad.exe” and pressing Enter to open the “Notepad” window directly. In this window, you will copy and paste the following script:
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
After pasting the script, you can edit the value in front of iPercent with any number from 1 – 100, as this is the percentage at which the notification will appear when the battery reaches it.
After pasting the script, you can edit the value in front of iPercent with any number from 1 – 100, as this is the percentage at which the notification will appear when the battery reaches it.
After saving the file, click on the File section at the top, and from the drop-down menu that appears, click on the Save as option to display another window where you can select the location to save the file. It is recommended to save it on the desktop because we will move it to another location later. The most important thing here is the name of the file, so choose any name as long as it ends with the extension “vbs.” as shown in the image above. Finally, click Save to save the file.
*
Note: If you find the above steps difficult, you can download the ready-made script file
from here.
In any case, after having the file, you can double-click on it to run it, as it creates a process in the background to monitor the battery charge percentage. However, once you shut down the computer and restart it, the file will not work until you manually run it. To make things easier, we can make the file start working automatically as soon as the device is turned on. To complete this process, all you have to do is navigate to the following path:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
Then add the file inside the Startup folder either by drag and drop as shown in the image above, or by copying and pasting the file into the folder.
In this way, whenever the laptop starts working, the script file will work with it. It will monitor the battery charge percentage after connecting the device to the charger, and once the percentage reaches 95% (or as specified during the script file creation), a notification will appear as shown in the image above. You can then disconnect the charger cable from the device to preserve the battery life for as long as possible. In this way, you have activated the notification when the laptop battery is fully charged without using any software.
There is another point I would like to mention in relation to this article. Most laptops have a feature called “Conservation Mode”, and in Lenovo devices, you will find this option within the official Lenovo Vantage application, for which we provided a review in the article “Important App to Download If You Use Lenovo Laptop.” Generally, this mode is designed for users who keep the charger connected to the device at all times. When activated, the battery is charged up to 60% of its capacity, then the charging is stopped until the percentage drops below 60% before recharging again. According to Lenovo, this improves battery performance.