IUpdateServiceManager::UnregisterServiceWithAU method (wuapi.h)
Unregisters a service with Automatic Updates.
Syntax
HRESULT UnregisterServiceWithAU(
BSTR serviceID
);
Parameters
serviceID
An identifier for the service to be unregistered.
Return value
Returns S_OK if successful. Otherwise, returns a COM or Windows error code.
This method can also return the following error codes.
Return code | Description |
---|---|
|
A parameter value is invalid. |
|
This method cannot be called from a remote computer. |
|
The Windows Update service could not be removed. |
|
The state of Automatic Updates could not be changed. |
|
Attempt to register an unknown service. |
|
The computer could not access the update site. |
|
The user canceled the change. |
Remarks
This method returns WU_E_DS_INVALIDOPERATION if the requested change in the state of Automatic Updates is contrary to the specifications in the Authorization Cab. An error is returned by WinVerifyTrust function if the Authorization Cab has not been signed.
This method returns WU_E_DS_UNKNOWNSERVICE if the service to be removed does not exist.
This method returns WU_E_DS_NEEDWINDOWSSERVICE if you attempt to remove the Windows Update service and if it is the only service that is registered with Automatic Updates.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional with SP3 [desktop apps only] |
Minimum supported server | Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only] |
Target Platform | Windows |
Header | wuapi.h |
Library | Wuguid.lib |
DLL | Wuapi.dll |