You can do it easily just you have to the following steps. Go to the start menu and click on Control Panel now select the Power Option. After this select the Change Plan Settings
Now another window will come over and now you have to select the option Change Advance Power Setting
Now a small window pops up and scroll down to find the option Power Button and Lid and click on +
sigh to expand it. Now you will see the option Power button action and clcik the +
to expand it.
Now select the option Shut Down for On battery
and Plug In
and click apply. Now whenever you press the power button computer will shutdown. But still one problem how to power off without force it. Now copy and paste the following keys in notepad and save it with the name of shutdown.reg
.
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\Memory Management]
"ClearPageFileAtShutdown"=dword:00000001
[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"AutoEndTasks"="1"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="1000"
After saving it on disk just double click on it to add to registry. Windows will ask you to confirm just press the OK button every time and you are on the way. It will shutdown the windows without asking you to force shutdown.
Note: This will always shut down Windows, even if an application is open with unsaved changes.
shutdown /s /t 0
command in the Command Prompt.