Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
2Shirt 2023-07-11 11:43:00 -07:00
commit 10eb638221
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 13 additions and 0 deletions

View file

@ -48,6 +48,7 @@ BASE_MENUS = {
MenuEntry('Open-Shell', 'auto_config_open_shell', selected=False),
MenuEntry('Disable Chrome Notifications', 'auto_disable_chrome_notifications', selected=False),
MenuEntry('Disable Fast Startup', 'auto_disable_fast_startup', selected=False),
MenuEntry('Disable Password Expiration', 'auto_disable_password_expiration'),
MenuEntry('Disable Telemetry', 'auto_shutup_10'),
MenuEntry('Enable BSoD MiniDumps', 'auto_enable_bsod_minidumps'),
MenuEntry('Enable Hibernation', 'auto_enable_hibernation', selected=False),

View file

@ -513,6 +513,7 @@ def auto_disable_chrome_notifications():
NOTE: This can cause Chrome Sync to be re-authenticated."""
TRY_PRINT.run('Disable Chrome Notifications...', disable_chrome_notifications)
def auto_disable_fast_startup():
"""Disable fast startup (i.e. Hiberboot)."""
TRY_PRINT.run(
@ -522,6 +523,11 @@ def auto_disable_fast_startup():
)
def auto_disable_password_expiration() -> None:
"""Disable password expiration for all users."""
TRY_PRINT.run('Disable password expiration...', disable_password_expiration)
def auto_enable_hibernation():
"""Enable Hibernation."""
TRY_PRINT.run(
@ -746,6 +752,12 @@ def disable_chrome_notifications() -> None:
pref_file.write_text(json.dumps(pref_data, separators=(',', ':')))
def disable_password_expiration() -> None:
"""Disable password expiration for all users."""
cmd = ['wmic', 'UserAccount', 'set', 'PasswordExpires=False']
run_program(cmd)
def enable_bsod_minidumps() -> None:
"""Enable saving minidumps during BSoDs."""
cmd = ['wmic', 'RECOVEROS', 'set', 'DebugInfoType', '=', '3']