def set_key_value(
        key_path: str,
        subkey_name: str,
        value: str | int,
        hive: int = winreg.HKEY_CURRENT_USER,
    ) -> None:
        """
        Changes the value of a subkey. Creates the subkey if it doesn't exist.
        """

        registry_key = winreg.OpenKey(hive, key_path, 0, winreg.KEY_WRITE)
        winreg.SetValueEx(registry_key, subkey_name, 0, winreg.REG_SZ, value)
        winreg.CloseKey(registry_key)

        Changes the value of a subkey. Creates the subkey if it doesn't exist.
        
context_menu/windows_menus.py