diff --git a/setup.py b/setup.py index b072f17..0530cc4 100644 --- a/setup.py +++ b/setup.py @@ -11,20 +11,37 @@ import os uninstallkey = [] +# Relative subdirectories under ProgramData used for this package's rollback state. STATE_DIRECTORY = ('Comitari', 'HardeningSafe') +# Stores original registry values plus their package target for conditional rollback. STATE_FILENAME = 'original-values.json' # Intentionally limited machine-wide controls. Keep state-file paths in the # legacy PowerShell format so existing installations can roll back safely. +# +# SETTINGS entry parameters: +# Path - HKLM registry key in the format accepted by _registry_path(). +# These keys apply to the computer, rather than one signed-in user. +# Name - exact Windows policy value name within that key. +# Value - desired integer REG_DWORD written by _write_value(). SETTINGS = ( + # Set the machine policy that disables AutoRun commands. {'Path': r'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer', 'Name': 'NoAutorun', 'Value': 1}, + + # Disable AutoPlay for every drive type (0xFF mask). {'Path': r'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer', 'Name': 'NoDriveTypeAutoRun', 'Value': 255}, + + # Disable AutoPlay for devices that do not expose a volume. {'Path': r'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer', 'Name': 'NoAutoplayfornonVolume', 'Value': 1}, + + # Prevent use of the camera from the Windows lock screen. {'Path': r'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization', 'Name': 'NoLockScreenCamera', 'Value': 1}, + + # Prevent enabling a slideshow on the Windows lock screen. {'Path': r'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization', 'Name': 'NoLockScreenSlideshow', 'Value': 1}, )