How to automatically shutdown laptop if unplugged
I want my laptop to shutdown automatically after it gets disconnected from power. Can someone tell me if there exists some app for this for Windows 7
Type “Power Options” in Start Menu search text field and hit enter key.
Click on “Change Plan Settings” in front of active plan (Balanced, High Performance or Power Saver).
Click on “Change advanced power settings”.
In the next window scroll down and find the “Battery” option, Expand it.
Expand “Low battery Level” and change the “on battery” value a high value e.g 95%.
Expand the “Low battery action” and change the “on battery” option to Shutdown.
Source