🐍 Python 3.10+
Check "Disable Windows Telemetry" Status (Python)
Reads the registry value behind the "Disable Windows Telemetry" tweak via winreg to confirm whether it's applied.
check_disable_telemetry_status.py
#!/usr/bin/env python3
"""
check_disable_telemetry_status.py
Checks whether "Disable Windows Telemetry" is currently applied.
Usage:
python check_disable_telemetry_status.py
"""
import winreg
def main() -> None:
try:
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Policies\Microsoft\Windows\DataCollection")
value, _ = winreg.QueryValueEx(key, "AllowTelemetry")
winreg.CloseKey(key)
print(f"Current value of 'AllowTelemetry': {value}")
except FileNotFoundError:
print("'AllowTelemetry' is not set (using the Windows default).")
if __name__ == "__main__":
main()