Partager via


IUpdateInstaller::Install method

Starts a synchronous installation of the updates.

Syntax

HRESULT Install(
  [out] IInstallationResult **retval
);

Parameters

  • retval [out]
    An IInstallationResult interface that represents the results of an installation operation for each update that is specified in a request.

Return value

This method returns the following HRESULT values and other COM or Windows error codes.

Return code Description
S_OK

The update was installed successfully.

WU_E_INSTALL_NOT_ALLOWED

Do not call this method when the installer is installing or removing an update.

Call this method only when the IsBusy property of the IUpdateInstaller interface returns VARIANT_FALSE.

WU_E_NO_UPDATE

There are no updates in a collection.

 

Remarks

This method returns WU_E_NO_UPDATE if the Updates property of IUpdateInstaller is not set. This method also returns WU_E_NO_UPDATE if the Updates property is set to an empty collection.

Requirements

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]

Header

Wuapi.h

IDL

Wuapi.idl

Library

Wuguid.lib

DLL

Wuapi.dll

See also

IUpdateInstaller