From The Compiler, 6 Years ago, written in Python.
Embed
  1. import winreg
  2.  
  3. def disable():
  4.     with winreg.OpenKey(key=winreg.HKEY_CURRENT_USER,
  5.                         sub_key=r'Software\Microsoft\Windows\CurrentVersion'
  6.                         r'\Explorer\Advanced', access=winreg.KEY_WRITE) as k:
  7.         try:
  8.             winreg.SetValueEx(k, 'EnableBalloonTips', None, winreg.REG_DWORD,
  9.                               0) # key, value_name, reserved, type, value
  10.         except OSError as e:
  11.             print("ERROR: There was an error while turning off tooltips:")
  12.             print(e)
  13.             return False
  14.     print("Turned off tooltips successfully!")
  15.     return True