🐍 Python 3.10+

Check "Disable Aero Shake" Status (Python)

Reads the registry value behind the "Disable Aero Shake" tweak via winreg to confirm whether it's applied.

By WindowsScripting.com · 642 B
check_disable_aero_shake_status.py
#!/usr/bin/env python3
"""
check_disable_aero_shake_status.py

Checks whether "Disable Aero Shake" is currently applied.

Usage:
    python check_disable_aero_shake_status.py
"""

import winreg


def main() -> None:
    try:
        key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced")
        value, _ = winreg.QueryValueEx(key, "DisallowShaking")
        winreg.CloseKey(key)
        print(f"Current value of 'DisallowShaking': {value}")
    except FileNotFoundError:
        print("'DisallowShaking' is not set (using the Windows default).")


if __name__ == "__main__":
    main()