From registry
- Open registry editor
- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system
- In the right side open "shutdownwithoutlogon" key
- Edit "value data" to 0
- That it, you are done
- Start > run
- Type secpol.msc and press enter to open Local security policy
- Expand Local Policies, and then click Security Options
- In the right side double click "Shutdown: Allow system to be shut down without having to log on" policy
- In local security settings tab select disable and click apply and ok.