winreg.SetValueEx()

winreg.SetValueEx(key, value_name, reserved, type, value) Stores data in the value field of an open registry key. key is an already open key, or one of the predefined HKEY_* constants. value_name is a string that names the subkey with which the value is associated. reserved can be anything – zero is always passed to the API. type is an integer that specifies the type of the data. See Value Types for the available types. value is a string that specifies the new value. This method can also set

winsound.PlaySound()

winsound.PlaySound(sound, flags) Call the underlying PlaySound() function from the Platform API. The sound parameter may be a filename, audio data as a string, or None. Its interpretation depends on the value of flags, which can be a bitwise ORed combination of the constants described below. If the sound parameter is None, any currently playing waveform sound is stopped. If the system indicates an error, RuntimeError is raised.

winreg.PyHKEY.__enter__()

PyHKEY.__enter__() PyHKEY.__exit__(*exc_info) The HKEY object implements __enter__() and __exit__() and thus supports the context protocol for the with statement: with OpenKey(HKEY_LOCAL_MACHINE, "foo") as key: ... # work with key will automatically close key when control leaves the with block.

winreg.QueryValueEx()

winreg.QueryValueEx(key, value_name) Retrieves the type and data for a specified value name associated with an open registry key. key is an already open key, or one of the predefined HKEY_* constants. value_name is a string indicating the value to query. The result is a tuple of 2 items: Index Meaning 0 The value of the registry item. 1 An integer giving the registry type for this value (see table in docs for SetValueEx())

winreg.QueryReflectionKey()

winreg.QueryReflectionKey(key) Determines the reflection state for the specified key. key is an already open key, or one of the predefined HKEY_* constants. Returns True if reflection is disabled. Will generally raise NotImplemented if executed on a 32-bit operating system.

winreg.PyHKEY.__exit__()

PyHKEY.__exit__(*exc_info) The HKEY object implements __enter__() and __exit__() and thus supports the context protocol for the with statement: with OpenKey(HKEY_LOCAL_MACHINE, "foo") as key: ... # work with key will automatically close key when control leaves the with block.

winreg.QueryValue()

winreg.QueryValue(key, sub_key) Retrieves the unnamed value for a key, as a string. key is an already open key, or one of the predefined HKEY_* constants. sub_key is a string that holds the name of the subkey with which the value is associated. If this parameter is None or empty, the function retrieves the value set by the SetValue() method for the key identified by key. Values in the registry have name, type, and data components. This method retrieves the data for a key’s first value that h

winreg.QueryInfoKey()

winreg.QueryInfoKey(key) Returns information about a key, as a tuple. key is an already open key, or one of the predefined HKEY_* constants. The result is a tuple of 3 items: Index Meaning 0 An integer giving the number of sub keys this key has. 1 An integer giving the number of values this key has. 2 An integer giving when the key was last modified (if available) as 100’s of nanoseconds since Jan 1, 1601.

winreg.OpenKey()

winreg.OpenKey(key, sub_key, reserved=0, access=KEY_READ) winreg.OpenKeyEx(key, sub_key, reserved=0, access=KEY_READ) Opens the specified key, returning a handle object. key is an already open key, or one of the predefined HKEY_* constants. sub_key is a string that identifies the sub_key to open. reserved is a reserved integer, and must be zero. The default is zero. access is an integer that specifies an access mask that describes the desired security access for the key. Default is KEY_READ.

winreg.FlushKey()

winreg.FlushKey(key) Writes all the attributes of a key to the registry. key is an already open key, or one of the predefined HKEY_* constants. It is not necessary to call FlushKey() to change a key. Registry changes are flushed to disk by the registry using its lazy flusher. Registry changes are also flushed to disk at system shutdown. Unlike CloseKey(), the FlushKey() method returns only when all the data has been written to the registry. An application should only call FlushKey() if it re