🐍 Python 3.10+
Disable Remote Assistance (Python)
Disables the ability for others to remotely assist this PC (requires admin). Requires an elevated (Administrator) prompt. Applies the tweak via the stdlib winreg module.
set_disable_remote_assistance.py
#!/usr/bin/env python3
"""
set_disable_remote_assistance.py
Disable Remote Assistance.
Disables the ability for others to remotely assist this PC (requires admin). Requires an elevated (Administrator) prompt.
Usage:
python set_disable_remote_assistance.py
"""
import winreg
def main() -> None:
key = winreg.CreateKeyEx(
winreg.HKEY_LOCAL_MACHINE, r"SYSTEM\CurrentControlSet\Control\Remote Assistance", 0, winreg.KEY_SET_VALUE
)
winreg.SetValueEx(key, "fAllowToGetHelp", 0, winreg.REG_DWORD, 0)
winreg.CloseKey(key)
print("Disable Remote Assistance applied.")
if __name__ == "__main__":
main()