Add option to disable password expiration

This commit is contained in:
2Shirt 2023-07-11 11:12:12 -07:00
parent 7c16d13f65
commit cda5aee714
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 12 additions and 0 deletions

View file

@ -43,6 +43,7 @@ BASE_MENUS = {
),
'Configure System': (
MenuEntry('Open Shell', 'auto_config_open_shell'),
MenuEntry('Disable Password Expiration', 'auto_disable_password_expiration'),
MenuEntry('Enable BSoD MiniDumps', 'auto_enable_bsod_minidumps'),
MenuEntry('Enable RegBack', 'auto_enable_regback'),
MenuEntry('Enable System Restore', 'auto_system_restore_enable'),

View file

@ -426,6 +426,11 @@ def auto_config_open_shell() -> None:
TRY_PRINT.run('Open Shell...', config_open_shell)
def auto_disable_password_expiration() -> None:
"""Disable password expiration for all users."""
TRY_PRINT.run('Disable password expiration...', disable_password_expiration)
def auto_export_aida64_report() -> None:
"""Export AIDA64 reports."""
TRY_PRINT.run('AIDA64 Report...', export_aida64_report)
@ -620,6 +625,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']