TransactedRegistryKey.CreateSubKey Method (String, RegistryKeyPermissionCheck)

Creates a new subkey or opens an existing one. This method is introduced in Windows PowerShell 2.0.

Namespace: Microsoft.PowerShell.Commands.Internal
Assembly: System.Management.Automation (in System.Management.Automation.dll)

Dim instance As TransactedRegistryKey
Dim subkey As String
Dim permissionCheck As RegistryKeyPermissionCheck
Dim returnValue As TransactedRegistryKey

returnValue = instance.CreateSubKey(subkey, permissionCheck)

public TransactedRegistryKey CreateSubKey (
	string subkey,
	RegistryKeyPermissionCheck permissionCheck
/** @attribute ComVisibleAttribute(false) */ 
public TransactedRegistryKey CreateSubKey (
	String subkey, 
	RegistryKeyPermissionCheck permissionCheck
public function CreateSubKey (
	subkey : String, 
	permissionCheck : RegistryKeyPermissionCheck
) : TransactedRegistryKey



The subkey to add or the path to the subkey to open.


One of the RegistryKeyPermissionCheck values that specifies whether the key is opened for read or read/write access.

Return Value

Returns a TransactedRegistryKey that represents the registry key.

This topic is included in this SDK for completeness only.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Target Platforms