'Battery charging optimisation

I am looking to take control of the power/battery switching on a laptop. My goal is to be able to switch between the two when I choose. Is there a specific BIOS command I need to know about? Can anyone help me?

I am looking to create a program that allows me to decide when my laptop should be on battery power and when it should be on AC power without having to unplug it.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source