🐍 Python 3.10+

Check "Disable Feedback Notifications" Status (Python)

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

By WindowsScripting.com · 663 B
check_disable_feedback_notifications_status.py
#!/usr/bin/env python3
"""
check_disable_feedback_notifications_status.py

Checks whether "Disable Feedback Notifications" is currently applied.

Usage:
    python check_disable_feedback_notifications_status.py
"""

import winreg


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


if __name__ == "__main__":
    main()