Skip to content

Commit

Permalink
Add option to disable Fast Startup
Browse files Browse the repository at this point in the history
  • Loading branch information
cschneegans committed Aug 1, 2024
1 parent dafc747 commit 4e6b022
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ public record class Configuration(
bool DisableDefenderPE,
bool DisableSac,
bool DisableSystemRestore,
bool DisableFastStartup,
bool TurnOffSystemSounds,
bool DisableAppSuggestions,
bool DisableWidgets,
Expand Down Expand Up @@ -316,6 +317,7 @@ HideModes HideFiles
DisableDefender: false,
DisableDefenderPE: false,
DisableSac: false,
DisableFastStartup: false,
DisableSystemRestore: false,
TurnOffSystemSounds: false,
DisableAppSuggestions: false,
Expand Down
7 changes: 7 additions & 0 deletions modifier/Optimizations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ IEnumerable<string> SetExplorerOptions(string rootKey, string subKey)
]);
}

if (Configuration.DisableFastStartup)
{
appender.Append(
CommandBuilder.RegistryCommand(@"add ""HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power"" /v HiberbootEnabled /t REG_DWORD /d 0 /f")
);
}

if (Configuration.DisableSystemRestore)
{
CommandAppender oobe = GetAppender(CommandConfig.Oobe);
Expand Down

0 comments on commit 4e6b022

Please sign in to comment.