ICertificateEnrollmentPolicyServerSetup::InitializeInstallDefaults method (casetup.h)

The InitializeInstallDefaults method initializes the ICertificateEnrollmentPolicyServerSetup object with a default configuration.

Syntax

HRESULT InitializeInstallDefaults();

Return value

Return code Description
E_ACCESSDENIED
A user must be an administrator of the domain root or the enterprise. A computer must be joined to the domain.

If the user is not a domain root or enterprise administrator, the ErrorString property is set to:

"You must be a member of the Enterprise Admins group to run Setup."

If the computer is not joined to the domain, the ErrorString property is set to:

"The Certificate Enrollment Web Service or Certificate Enrollment Policy Web Service cannot be installed on a computer that is not a member of a domain."

HRESULT_FROM_WIN32(ERROR_INVALID_STATE)
The ICertificateEnrollmentPolicyServerSetup object has already been initialized. The ErrorString property is set to:

"The setup object has already been initialized. This object cannot be initialized more than once."

Remarks

This method performs the following actions:

  • Sets the default authentication procedure to Kerberos. You can call SetProperty to change the authentication method.
  • Sets the default URL to https://computerDNSname/ADPolicyProvider_CEP_Kerberos/service.svc/CEP.
  • Checks to determine whether the CEP service is installed on a computer running Windows Server 2008 R2.
    Note  If this check fails, the method sets the ErrorString property to "The Certificate Enrollment Web Service or Certificate Enrollment Policy Web Service must be installed on a member server in an Active Directory forest in which the Windows Server 2008 R2 version of ADPrep /forestprep has been successfully run."
     
You must call the InitializeInstallDefaults method before calling any method other than UnInstall. Call the Install method to install the configured CEP service. Call the UnInstall method on a new ICertificateEnrollmentPolicyServerSetup object to remove the service.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header casetup.h
DLL Certocm.dll

See also

CEPSetupProperty

ICertificateEnrollmentPolicyServerSetup

SetProperty