The Enabled property gets or sets a Boolean value that indicates whether the rules of the configuration group are enabled.
HRESULT put_Enabled( VARIANT_BOOL fEnabled ); HRESULT get_Enabled( VARIANT_BOOL* 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.
Boolean value that indicates whether the rules of the configuration group are enabled.
This property method returns S_OK if the call is successful; otherwise, it returns an error code.
Property Enabled As Boolean
Boolean value that indicates whether the rules of the configuration group are 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!"
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.
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. |
Send comments about this topic to Microsoft
Build date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.