RegistryPreference Class

 

Represents the Group Policy Object Editor extension that modifies registry preference items.

Namespace:   Microsoft.GroupPolicy
Assembly:  Microsoft.GroupPolicy.Management (in Microsoft.GroupPolicy.Management.dll)

Inheritance Hierarchy

System.Object
  Microsoft.GroupPolicy.GroupPolicyExtension
    Microsoft.GroupPolicy.PreferenceExtension
      Microsoft.GroupPolicy.RegistryPreference

Syntax

public class RegistryPreference : PreferenceExtension
public ref class RegistryPreference : PreferenceExtension
type RegistryPreference = 
    class
        inherit PreferenceExtension
    end
Public Class RegistryPreference
    Inherits PreferenceExtension

Constructors

Name Description
System_CAPS_pubmethod RegistryPreference(DirectoryContext, Guid, Boolean, Boolean)

Initializes a new instance of the RegistryPreference class by using the specified DirectoryContext, the specified Group Policy object (GPO) ID (GUID), a value that specifies whether to edit Computer Configuration or User Configuration, and a value that specifies whether to open the GPO in read-only mode.

System_CAPS_pubmethod RegistryPreference(DirectoryContext, String, Boolean, Boolean)

Initializes a new instance of the RegistryPreference class by using the specified DirectoryContext, the display name of the Group Policy object (GPO), a value that specifies whether to edit Computer Configuration or User Configuration, and a value that specifies whether to open the GPO in read-only mode.

System_CAPS_pubmethod RegistryPreference(Domain, Guid, Boolean, Boolean)

Initializes a new instance of the RegistryPreference class by using the specified Domain, the specified Group Policy object (GPO) ID (GUID), a value that specifies whether to edit Computer Configuration or User Configuration, and a value that specifies whether to open the GPO in read-only mode.

System_CAPS_pubmethod RegistryPreference(Domain, String, Boolean, Boolean)

Initializes a new instance of the RegistryPreference class by using the specified Domain, the display name of the Group Policy object (GPO), a value that specifies whether to edit Computer Configuration or User Configuration, and a value that specifies whether to open the GPO in read-only mode.

System_CAPS_pubmethod RegistryPreference(DomainController, Guid, Boolean, Boolean)

Initializes a new instance of the RegistryPreference class by using the specified DomainController, the specified Group Policy object (GPO) ID (GUID), a value that specifies whether to edit Computer Configuration or User Configuration, and a value that specifies whether to open the GPO in read-only mode.

System_CAPS_pubmethod RegistryPreference(DomainController, String, Boolean, Boolean)

Initializes a new instance of the RegistryPreference class by using the specified DomainController, the display name of the Group Policy object (GPO), a value that specifies whether to edit Computer Configuration or User Configuration, and a value that specifies whether to open the GPO in read-only mode.

Properties

Name Description
System_CAPS_protproperty ClientSideExtensionGuid

Gets the GUID that identifies the client-side extension that process Registry preference items.(Overrides GroupPolicyExtension.ClientSideExtensionGuid.)

System_CAPS_protproperty ComputerEditorGuid

Gets the GUID that identifies the editor used to edit Registry preference items in the computer section (Computer Configuration) of the Group Policy object (GPO).(Overrides GroupPolicyExtension.ComputerEditorGuid.)

System_CAPS_protproperty Domain

Gets the domain for the Group Policy object (GPO).(Inherited from GroupPolicyExtension.)

System_CAPS_protproperty DomainController

Gets domain controller on which the Group Policy object (GPO) is being edited.(Inherited from GroupPolicyExtension.)

System_CAPS_protproperty Gpo

Gets the underlying GroupPolicyObject that represents the GPO being edited.(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty GpoDisplayName

Gets the display name of the Group Policy object (GPO) that is being edited.(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty GpoId

Gets the ID (GUID) of the Group Policy object (GPO).(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty GpoPath

Gets the distinguished name of the Group Policy object (GPO).(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty IsComputerConfiguration

Gets a value that indicates whether the Computer Configuration section of the Group Policy object (GPO) is being edited.(Inherited from PreferenceExtension.)

System_CAPS_protproperty IsOpened

Gets a value that indicates whether the GPO has been opened.(Inherited from GroupPolicyExtension.)

System_CAPS_pubproperty IsReadOnly

Gets a value that indicates whether the Group Policy object (GPO) is opened in read-only mode.(Inherited from GroupPolicyExtension.)

System_CAPS_protproperty SettingsFilePath

Gets the UNC path of the XML file that contains the settings for the Group Policy object (GPO) section that is being edited.(Inherited from PreferenceExtension.)

System_CAPS_protproperty SysvolPreferenceFileName

Gets the name of the XML file on SYSVOL that contains the Registry preference items.(Overrides PreferenceExtension.SysvolPreferenceFileName.)

System_CAPS_protproperty SysvolPreferenceSubdirectory

Gets the name of the subdirectory on SYSVOL in which the XML file that contains the Registry preference items that are being edited exists.(Overrides PreferenceExtension.SysvolPreferenceSubdirectory.)

System_CAPS_protproperty UserEditorGuid

Gets the GUID that identifies the editor used to edit Registry preference items in the user section (User Configuration) of the Group Policy object (GPO).(Overrides GroupPolicyExtension.UserEditorGuid.)

Methods

Name Description
System_CAPS_pubmethod Delete(RegistryHive, String)

Deletes the Registry preference items that are configured for the specified registry key or any of its first-level values.

System_CAPS_pubmethod Delete(RegistryHive, String, Int32)

Deletes the Registry preference item at the specified order if it is configured for the specified key or one of its first-level values.

System_CAPS_pubmethod Delete(RegistryHive, String, PreferenceAction)

Deletes the Registry preference items that are configured with the specified action for the specified registry key or any of its first-level values.

System_CAPS_pubmethod Delete(RegistryHive, String, String)

Deletes all Registry preference items configured for the specified registry value.

System_CAPS_pubmethod Delete(RegistryHive, String, String, Int32)

Deletes the Registry preference item at the specified order if it is configured for the specified registry value.

System_CAPS_pubmethod Delete(RegistryHive, String, String, PreferenceAction)

Deletes all Registry preference items that have the specified action that are configured for the specified registry value.

System_CAPS_pubmethod Dispose()

Releases all resources used by the current instance of the GroupPolicyExtension class.(Inherited from GroupPolicyExtension.)

System_CAPS_protmethod Dispose(Boolean)

Releases the unmanaged resources used by the GroupPolicyExtension class and optionally releases the managed resources.(Overrides GroupPolicyExtension.Dispose(Boolean).)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

Allows a GroupPolicyExtension object to attempt to free resources and perform other cleanup operations before the object is reclaimed by garbage collection.(Inherited from GroupPolicyExtension.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod OnOpened(EventArgs)

Raises the Opened event.(Overrides GroupPolicyExtension.OnOpened(EventArgs).)

System_CAPS_protmethod OnOpening(EventArgs)

Occurs after the Group Policy object (GPO) has been opened, but before IsOpened is set to true.(Inherited from PreferenceExtension.)

System_CAPS_protmethod OnSaved(EventArgs)

Called by the Save method after the save has been performed, to allow for post-processing by the derived class.(Inherited from GroupPolicyExtension.)

System_CAPS_protmethod OnSaving(SavingEventArgs)

Occurs before the Group Policy object (GPO) revision numbers are updated.(Overrides GroupPolicyExtension.OnSaving(SavingEventArgs).)

System_CAPS_protmethod OpenGpo(Boolean)

Opens the Group Policy object (GPO) according to the specified value for read only.(Inherited from GroupPolicyExtension.)

System_CAPS_protmethod OpenGpo(Boolean, Boolean)

Opens the Group Policy object (GPO) according to the specified value for read only and optionally loads the registry.(Inherited from GroupPolicyExtension.)

System_CAPS_pubmethod Read(RegistryHive, String)

Reads all Registry preference items that configure the specified key or any of its first-level values.

System_CAPS_pubmethod Read(RegistryHive, String, Int32)

Reads the Registry preference item at the specified order if it configures the specified key or any of its first-level values.

System_CAPS_pubmethod Read(RegistryHive, String, PreferenceAction)

Reads all the Registry preference items that have the specified action that configure the key or any of its first-level values.

System_CAPS_pubmethod Read(RegistryHive, String, String)

Reads all the Registry preference items that configure the specified registry value.

System_CAPS_pubmethod Read(RegistryHive, String, String, Int32)

Reads the Registry preference item at the specified order if it configures the specified registry value.

System_CAPS_pubmethod Read(RegistryHive, String, String, PreferenceAction)

Reads all the Registry preference items that have the specified action that configure the specified registry value.

System_CAPS_pubmethod Save()

Saves the GPO section (Computer Configuration or User Configuration) for the Group Policy object (GPO).(Inherited from PreferenceExtension.)

System_CAPS_protmethod Save(Boolean)

Saves the specified Group Policy object (GPO) section for the GPO.(Inherited from GroupPolicyExtension.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod WriteBinaryValue(RegistryHive, String, String, Byte[], PreferenceAction, Int32, Boolean)

Writes a Registry preference item that configures a Binary registry value.

System_CAPS_pubmethod WriteDWordValue(RegistryHive, String, String, Int32, PreferenceAction, Int32, Boolean)

Writes a Registry preference item that configures a DWord registry value by using the specified 32-bit signed integer.

System_CAPS_pubmethod WriteDWordValue(RegistryHive, String, String, UInt32, PreferenceAction, Int32, Boolean)

Writes a Registry preference item that configures a DWord registry value by using the specified 32-bit unsigned integer.

System_CAPS_pubmethod WriteExpandStringValue(RegistryHive, String, String, String, PreferenceAction, Int32, Boolean)

Writes a Registry preference item that configures an ExpandString registry value.

System_CAPS_pubmethod WriteKey(RegistryHive, String, PreferenceAction, Int32, Boolean)

Writes a Registry preference item that configures a registry key.

System_CAPS_pubmethod WriteMultiStringValue(RegistryHive, String, String, String[], PreferenceAction, Int32, Boolean)

Writes a Registry preference item that configures a MultiString registry value by using the specified 32-bit unsigned integer.

System_CAPS_pubmethod WriteQWordValue(RegistryHive, String, String, Int64, PreferenceAction, Int32, Boolean)

Writes a Registry preference item that configures a QWord registry value by using the specified 64-bit signed integer.

System_CAPS_pubmethod WriteQWordValue(RegistryHive, String, String, UInt64, PreferenceAction, Int32, Boolean)

Writes a Registry preference item that configures a QWord registry value by using the specified 64-bit unsigned integer.

System_CAPS_pubmethod WriteStringValue(RegistryHive, String, String, String, PreferenceAction, Int32, Boolean)

Writes a Registry preference item that configures a String registry value.

Thread Safety

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

See Also

Microsoft.GroupPolicy Namespace

Return to top