Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling fast boot (system settings) programmatically

I'm currently writing a small script that will set up a bunch of different things (settings, programs etc) on company computers. My goal is to make this happen with the least amount of human interaction.

There is this one setting that I am having a hard time finding a way to set it programmatically.

The setting I am talking about specifically is "Turn on fast startup" in Control Panel\Hardware and Sound\Power Options\System Settings

By default in windows 10 this box is checked, I need a way to disable it using either batch, powershell, or vbscript. (Or any other small filetype that I can run with a batch file)

enter image description here

like image 509
GrumpyCrouton Avatar asked Dec 15 '22 07:12

GrumpyCrouton


2 Answers

Here's a batch file registry hack that should do what you want. 0=disables and 1=enables fast startup. This leaves regular hibernate alone. I use this as part of my prep script for new machines that have SSDs and thus already boot-up super fast.

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t reg_dword /d 0 /f
like image 55
Robert Avatar answered Jan 19 '23 01:01

Robert


You can do that with PowerCfg:

powercfg /hibernate OFF

Or using a Group Policy.

like image 38
Martin Brandl Avatar answered Jan 19 '23 00:01

Martin Brandl