🐍 Python 3.10+

Check "Disable Window Animations" Status (Python)

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

By WindowsScripting.com · 610 B
check_disable_animations_status.py
#!/usr/bin/env python3
"""
check_disable_animations_status.py

Checks whether "Disable Window Animations" is currently applied.

Usage:
    python check_disable_animations_status.py
"""

import winreg


def main() -> None:
    try:
        key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Control Panel\Desktop\WindowMetrics")
        value, _ = winreg.QueryValueEx(key, "MinAnimate")
        winreg.CloseKey(key)
        print(f"Current value of 'MinAnimate': {value}")
    except FileNotFoundError:
        print("'MinAnimate' is not set (using the Windows default).")


if __name__ == "__main__":
    main()