Have you tried configuring your power policy?
- Open the Power Options page:
- Control Panel → Hardware and Sound → Power Options (figure 1)
or
- Search for
power
(figure 2)
or
- From the notification area (figure 3)
- To edit the current power policy, click Change plan settings (you can also edit other policies or create a new one) (figure 4)
- Click Change advanced power settings (figure 5)
- Expand the Battery branch
- Edit the actions for the different battery states (figure 6)
- Click [OK]
Update:
I have also looked into the "Critical battery action" tab, but there I can't configure it to do nothing, while I can do that for the "Low battery action"
I guess the rationale is that once the battery is so low that there’s nothing left, you have to do something. You can try adjusting the levels in that dialog (figure 6) to define what “low” and “critical” mean (e.g., change low to mean 50% or 1%, etc.) If your battery level gets reported as being low, but non-zero (e.g., sometimes 5%, sometimes 1%), then you could set critical to be 0%.
However, if your battery really is always reporting 0% (and not even 1%), then the fact is that the gauge in the battery is simply defective and I’m afraid the only resort is to either stay plugged in or get a new battery. The conceivable only way to prevent Windows from sleeping when the battery reaches 0% is to hack the system because there is no method (either built-in or via a third-party program) to prevent it because a 0% battery is like pulling the cord out of a desktop system.
Figure 1: Control Panel Power Options applet
Figure 2: Power Options from search
Figure 3: Power Options from notification area
Figure 4: Power Options applet
Figure 5: Power plan settings editor
Figure 6: Battery state actions