Enabled Property of the IFPCSystemPolicyConfigGroup Interface

The Enabled property gets or sets a Boolean value that indicates whether the rules of the configuration group are enabled.

[C++]
HRESULT put_Enabled(
	VARIANT_BOOL fEnabled
);
HRESULT get_Enabled(
	VARIANT_BOOL* pfEnabled
);

Parameters

pfEnabled

Pointer to a Boolean variable that is set on return to VARIANT_TRUE if the rules of the configuration group are enabled, or to VARIANT_FALSE if the rules of the configuration group are disabled.

fEnabled

Boolean value that indicates whether the rules of the configuration group are enabled.

Return Value

This property method returns S_OK if the call is successful; otherwise, it returns an error code.

[Visual Basic]
Property Enabled As Boolean

Property Value

Boolean value that indicates whether the rules of the configuration group are enabled.

Example Code

This VBScript code example enables the system policy rules in the Scheduled Download Jobs system policy configuration group if they are not enabled.
' Define the enumeration value needed.
Const fpcSystemPolicyConfigGroup_Prefetcher = 12
' Create the root object.
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the other objects needed.
Dim tmgArray	' An FPCArray object
Dim configGroup   ' An FPCSystemPolicyConfigGroup object
' Get a reference to the array object.
Set tmgArray = root.GetContainingArray()
' Create an instance of the sytem policy configuration
' group object for the Job Scheduler service.
Set configGroup = tmgArray.SystemPolicy.CreateConfigurationGroupInstance(fpcSystemPolicyConfigGroup_Prefetcher)
' If the Scheduled Download Jobs system policy configuration group
' is disabled, enable it.
If configGroup.Enabled = False Then
	WScript.Echo "Enabling system policy rules..."
	configGroup.Enabled = True
	configGroup.Save
End If
WScript.Echo "Done!"

Remarks

This property is typically read/write. However, it is read-only for instances of the FPCSystemPolicyConfigGroup object (IFPCSystemPolicyConfigGroup interface in C++) created with the Service parameter of the CreateConfigurationGroupInstance method of the FPCSystemPolicy object set to any of the following values:

The system policy rules that are members of a configuration group whose properties are represented by an instance of the FPCSystemPolicyConfigGroup object (IFPCSystemPolicyConfigGroup interface in C++) created with the Service parameter set to any of these values cannot be enabled or disabled through this property.

The default value of this property for each configuration group is set during Setup.

Requirements

Client Requires Windows Vista or Windows XP.
Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
IDL

Declared in Msfpccom.idl.

DLL

Requires Msfpccom.dll.

See Also

FPCSystemPolicyConfigGroup


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.