🐍 Python 3.10+

Check "Increase Icon Cache Size" Status (Python)

Reads the registry value behind the "Increase Icon Cache Size" tweak via winreg to confirm whether it's applied.

By WindowsScripting.com · 639 B
check_increase_icon_cache_size_status.py
#!/usr/bin/env python3
"""
check_increase_icon_cache_size_status.py

Checks whether "Increase Icon Cache Size" is currently applied.

Usage:
    python check_increase_icon_cache_size_status.py
"""

import winreg


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


if __name__ == "__main__":
    main()