Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

winreg
connectregistry

What is winreg.ConnectRegistry(computer_name, key) in Python?

Sarvech Qadir

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

winreg (Windows Registry API) provides functions to expose the Windows Registry API to python. We use this module to expose a low-level interface to the registry.

ConnectRegistry

We can use ConnectRegistry to establish and connect to another registry on another computer. It returns a handle object.

Syntax

winreg.ConnectRegistry(computer_name, key)

Parameters

computer_name: Refers to the name of the remote computer to which we must connect.

We can use the local computer in the case that computer_name is not required.

key: Refers to the predefined handle to connect to.

Return value

This function returns the handle of the new opened key.

If the function fails, it raises an OSError exception.

RELATED TAGS

winreg
connectregistry

CONTRIBUTOR

Sarvech Qadir
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring