Powershell Microsoft.win32.registrykey Openremotebasekey Credentials Powershell Registry Opensubkey. OpenRemoteBaseKey will use the.
-->Definition
Represents a key-level node in the Windows registry. This class is a registry encapsulation.
- Attributes
- Implements
Examples
The following code example shows how to create a subkey under HKEY_CURRENT_USER, manipulate its contents, and then delete the subkey.
Remarks
To get an instance of RegistryKey, use one of the static members of the Registry class.
The registry acts as a central repository of information for the operating system and the applications on a computer. The registry is organized in a hierarchical format, based on a logical ordering of the elements stored within it (please see Registry for the base-level items in this hierarchy). When storing information in the registry, select the appropriate location based on the type of information being stored. Be sure to avoid destroying information created by other applications, because this can cause those applications to exhibit unexpected behavior, and can also have an adverse effect upon your own application.
Important
This type implements the IDisposable interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its Dispose method in a try
/catch
block. To dispose of it indirectly, use a language construct such as using
(in C#) or Using
(in Visual Basic). For more information, see the 'Using an Object that Implements IDisposable' section in the IDisposable interface topic.
Registry keys are the base unit of organization in the registry, and can be compared to folders in File Explorer. A particular key can have subkeys, just as a folder can have subfolders. Each key can be deleted, as long as the user has the appropriate permissions to do so, and the key is not a base key or at the level directly under the base keys. Each key can also have multiple values associated with it (a value can be compared to a file), which are used to store the information - for example, information about an application installed on the computer. Each value holds one particular piece of information, which can be retrieved or updated when required. For instance, you can create a RegistryKey for your company, under the key HKEY_LOCAL_MACHINESoftware, and then a subkey for each application that your company creates. Each subkey holds the information specific to that application, such as color settings, screen location and size, or recognized file extensions.
Note that information stored in the registry is available to other applications and users, and therefore should not be used to store security data or critical application information.
Caution
Do not expose RegistryKey objects in such a way that a malicious program could create thousands of meaningless subkeys or key/value pairs. For example, do not allow callers to enter arbitrary keys or values.
Starting in the .NET Framework 4, the length of a registry key is no longer limited to 255 characters.
Properties
Handle | Gets a SafeRegistryHandle object that represents the registry key that the current RegistryKey object encapsulates. |
Name | Retrieves the name of the key. |
SubKeyCount | Retrieves the count of subkeys of the current key. |
ValueCount | Retrieves the count of values in the key. |
View | Gets the view that was used to create the registry key. |
Methods
Explicit Interface Implementations
IDisposable.Dispose() | Performs a Close() on the current key. |
Extension Methods
GetAccessControl(RegistryKey) | Returns the security information of a registry key. |
GetAccessControl(RegistryKey, AccessControlSections) | Returns the security information of a registry key. |
SetAccessControl(RegistryKey, RegistrySecurity) | Changes the security attributes of an existing registry key. BitTorrent is a protocol that is designed to share files between Internet users. Need for speed most wanted ps2 iso. For the second group, let us explain the main information about torrentsNow let us try to explain what a torrent is and how to download torrent online. So, let's see what a torrent is, and how to use it.What is a torrent? Some Internet users have been using the technology for a long time, while others just want to try it in practice. All of this is very simple, and now you will understand. |