Here's the code I've been using to change the values of keys in the registry:
import winreg
key = winreg.CreateKey(winreg.HKEY_CURRENT_USER, 'AppEvents\\Schemes\\Apps\\.Default\\.Default\\.Current')
winreg.SetValueEx(key, '(Default)', 0, winreg.REG_SZ, '')
key.Close()
I've had no issues with using this on any keys within the registry. For some reason, if the value name is (Default), the code above doesn't work. It just inserts another value with the exact same name. This seems weird as no key can have 2 values with the same name.
I'm guessing that the names look exactly the same, but to the registry, they aren't the same name. I'm not sure why this would be, though.