Export (0) Print
Expand All

RegistryPermissionAttribute.Create Property

Gets or sets create access for the specified keys and values.

[Visual Basic]
Public Property Create As String
[C#]
public string Create {get; set;}
[C++]
public: __property String* get_Create();
public: __property void set_Create(String*);
[JScript]
public function get Create() : String;
public function set Create(String);

Property Value

A list of keys and values with paths for create access.

Example

[Visual Basic] 
' Set the Read, Write, Create, and All properties.
<RegistryPermissionAttribute(SecurityAction.PermitOnly, Read:="HKEY_LOCAL_MACHINE\HARDWARE"), _
RegistryPermissionAttribute(SecurityAction.PermitOnly, Write:="HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION"), _
RegistryPermissionAttribute(SecurityAction.PermitOnly, _
    Create:="HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System"), _
RegistryPermissionAttribute(SecurityAction.PermitOnly, _
    All:="HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor")> _
Public Shared Sub PermitOnlyMethod()

[C#] 
[RegistryPermissionAttribute(SecurityAction.PermitOnly, 
     Create = "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System")]

[C++] 
[RegistryPermissionAttribute(SecurityAction::PermitOnly,
   Create = S"HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System")]

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

RegistryPermissionAttribute Class | RegistryPermissionAttribute Members | System.Security.Permissions Namespace

Show:
© 2015 Microsoft