Lines Matching +full:windows +full:- +full:remote +full:- +full:only
1 :mod:`winreg` --- Windows registry access
5 :platform: Windows
6 :synopsis: Routines and objects for manipulating the Windows registry.
10 --------------
12 These functions expose the Windows registry API to Python. Instead of using an
13 integer as the registry handle, a :ref:`handle object <handle-object>` is used
17 .. _exception-changed:
26 ------------------
46 and returns a :ref:`handle object <handle-object>`.
48 *computer_name* is the name of the remote computer, of the form
56 .. audit-event:: winreg.ConnectRegistry computer_name,key winreg.ConnectRegistry
59 See :ref:`above <exception-changed>`.
65 :ref:`handle object <handle-object>`.
68 :ref:`HKEY_* constants <hkey-constants>`.
80 .. audit-event:: winreg.CreateKey key,sub_key,access winreg.CreateKey
82 .. audit-event:: winreg.OpenKey/result key winreg.CreateKey
85 See :ref:`above <exception-changed>`.
91 :ref:`handle object <handle-object>`.
94 :ref:`HKEY_* constants <hkey-constants>`.
102 :ref:`Access Rights <access-rights>` for other allowed values.
112 .. audit-event:: winreg.CreateKey key,sub_key,access winreg.CreateKeyEx
114 .. audit-event:: winreg.OpenKey/result key winreg.CreateKeyEx
119 See :ref:`above <exception-changed>`.
127 :ref:`HKEY_* constants <hkey-constants>`.
137 .. audit-event:: winreg.DeleteKey key,sub_key,access winreg.DeleteKey
140 See :ref:`above <exception-changed>`.
148 :ref:`HKEY_* constants <hkey-constants>`.
158 On 32-bit Windows, the WOW64 constants are ignored.
159 See :ref:`Access Rights <access-rights>` for other allowed values.
166 On unsupported Windows versions, :exc:`NotImplementedError` is raised.
168 .. audit-event:: winreg.DeleteKey key,sub_key,access winreg.DeleteKeyEx
173 See :ref:`above <exception-changed>`.
181 :ref:`HKEY_* constants <hkey-constants>`.
185 .. audit-event:: winreg.DeleteValue key,value winreg.DeleteValue
193 :ref:`HKEY_* constants <hkey-constants>`.
201 .. audit-event:: winreg.EnumKey key,index winreg.EnumKey
204 See :ref:`above <exception-changed>`.
212 :ref:`HKEY_* constants <hkey-constants>`.
222 +-------+--------------------------------------------+
226 +-------+--------------------------------------------+
230 +-------+--------------------------------------------+
234 +-------+--------------------------------------------+
236 .. audit-event:: winreg.EnumValue key,index winreg.EnumValue
239 See :ref:`above <exception-changed>`.
243 single: % (percent); environment variables expansion (Windows)
251 'C:\\Windows'
253 .. audit-event:: winreg.ExpandEnvironmentStrings str winreg.ExpandEnvironmentStrings
261 :ref:`HKEY_* constants <hkey-constants>`.
266 :func:`FlushKey` method returns only when all the data has been written to the
267 registry. An application should only call :func:`FlushKey` if it requires
292 from permissions -- see the `RegLoadKey documentation
293 <https://msdn.microsoft.com/en-us/library/ms724889%28v=VS.85%29.aspx>`__ for
297 specified in *file_name* is relative to the remote computer.
299 .. audit-event:: winreg.LoadKey key,sub_key,file_name winreg.LoadKey
305 Opens the specified key, returning a :ref:`handle object <handle-object>`.
308 :ref:`HKEY_* constants <hkey-constants>`.
316 Rights <access-rights>` for other allowed values.
322 .. audit-event:: winreg.OpenKey key,sub_key,access winreg.OpenKey
324 .. audit-event:: winreg.OpenKey/result key winreg.OpenKey
330 See :ref:`above <exception-changed>`.
338 :ref:`HKEY_* constants <hkey-constants>`.
342 +-------+---------------------------------------------+
347 +-------+---------------------------------------------+
350 +-------+---------------------------------------------+
354 +-------+---------------------------------------------+
356 .. audit-event:: winreg.QueryInfoKey key winreg.QueryInfoKey
364 :ref:`HKEY_* constants <hkey-constants>`.
375 .. audit-event:: winreg.QueryValue key,sub_key,value_name winreg.QueryValue
384 :ref:`HKEY_* constants <hkey-constants>`.
390 +-------+-----------------------------------------+
394 +-------+-----------------------------------------+
398 +-------+-----------------------------------------+
400 .. audit-event:: winreg.QueryValue key,sub_key,value_name winreg.QueryValueEx
408 :ref:`HKEY_* constants <hkey-constants>`.
415 If *key* represents a key on a remote computer, the path described by
416 *file_name* is relative to the remote computer. The caller of this method must
418 privileges are different than permissions -- see the
420 <https://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__
425 .. audit-event:: winreg.SaveKey key,file_name winreg.SaveKey
433 :ref:`HKEY_* constants <hkey-constants>`.
438 :const:`REG_SZ`, meaning only strings are supported. Use the :func:`SetValueEx`
453 .. audit-event:: winreg.SetValue key,sub_key,type,value winreg.SetValue
461 :ref:`HKEY_* constants <hkey-constants>`.
466 *reserved* can be anything -- zero is always passed to the API.
469 :ref:`Value Types <value-types>` for the available types.
483 .. audit-event:: winreg.SetValue key,sub_key,type,value winreg.SetValueEx
488 Disables registry reflection for 32-bit processes running on a 64-bit
492 <hkey-constants>`.
494 Will generally raise :exc:`NotImplementedError` if executed on a 32-bit operating
501 .. audit-event:: winreg.DisableReflectionKey key winreg.DisableReflectionKey
509 <hkey-constants>`.
511 Will generally raise :exc:`NotImplementedError` if executed on a 32-bit operating
516 .. audit-event:: winreg.EnableReflectionKey key winreg.EnableReflectionKey
524 :ref:`HKEY_* constants <hkey-constants>`.
528 Will generally raise :exc:`NotImplementedError` if executed on a 32-bit
531 .. audit-event:: winreg.QueryReflectionKey key winreg.QueryReflectionKey
537 ------------------
541 .. _hkey-constants:
587 This key is not used in versions of Windows after 98.
590 .. _access-rights:
596 <https://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__.
645 .. _64-bit-access-rights:
647 64-bit Specific
651 <https://msdn.microsoft.com/en-us/library/aa384129(v=VS.85).aspx>`__.
655 Indicates that an application on 64-bit Windows should operate on
656 the 64-bit registry view. On 32-bit Windows, this constant is ignored.
660 Indicates that an application on 64-bit Windows should operate on
661 the 32-bit registry view. On 32-bit Windows, this constant is ignored.
663 .. _value-types:
669 <https://msdn.microsoft.com/en-us/library/ms724884%28v=VS.85%29.aspx>`__.
677 32-bit number.
681 A 32-bit number in little-endian format. Equivalent to :const:`REG_DWORD`.
685 A 32-bit number in big-endian format.
689 Null-terminated string containing references to environment
698 A sequence of null-terminated strings, terminated by two null characters.
707 A 64-bit number.
713 A 64-bit number in little-endian format. Equivalent to :const:`REG_QWORD`.
719 A device-driver resource list.
731 A null-terminated string.
734 .. _handle-object:
737 -----------------------
739 This object wraps a Windows HKEY object, automatically closing it when the
748 Handle objects provide semantics for :meth:`__bool__` -- thus ::
757 true if they both reference the same underlying Windows handle value.
759 Handle objects can be converted to an integer (e.g., using the built-in
760 :func:`int` function), in which case the underlying Windows handle value is
762 integer handle, and also disconnect the Windows handle from the handle object.
767 Closes the underlying Windows handle.
774 Detaches the Windows handle from the handle object.
784 .. audit-event:: winreg.PyHKEY.Detach key winreg.PyHKEY.Detach