install

package
v0.0.0-...-1e69288 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package install handles installing updates.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBusy indicates that the Windows installer is busy
	ErrBusy = goerr.New("an installation or uninstallation is already in progress")
)

Functions

This section is empty.

Types

type Installer

type Installer struct {
	IUpdateInstaller    *ole.IDispatch
	IInstallationResult *ole.IDispatch
}

Installer represents an update Install interface. https://docs.microsoft.com/en-us/windows/desktop/api/wuapi/nn-wuapi-iupdateinstaller

func NewInstaller

NewInstaller creates an update download interface with a specified update collection.

func (*Installer) Close

func (i *Installer) Close()

Close turns down any open download sessions.

func (*Installer) HResult

func (i *Installer) HResult() (string, error)

HResult gets the HRESULT of the exception, if any, that is raised during the installation.

func (*Installer) Install

func (i *Installer) Install() error

Install will install the requested updates.

func (*Installer) IsBusy

func (i *Installer) IsBusy() (bool, error)

IsBusy gets a Boolean value that indicates whether an installation or uninstallation is in progress.

func (*Installer) RebootRequired

func (i *Installer) RebootRequired() (bool, error)

RebootRequired gets a Boolean value that indicates whether you must restart the computer to complete the installation.

func (*Installer) ResultCode

func (i *Installer) ResultCode() (int, error)

ResultCode gets an OperationResultCode value that specifies the result of an operation on an update. Possible Result codes: 0 - (orcNotStarted) The operation is not started. 1 - (orcInProgress) The operation is in progress. 2 - (orcSucceeded) The operation was completed successfully. 3 - (orcSucceededWithErrors) The operation is complete, but one or more errors occurred during the operation. The results might be incomplete. 4 - (orcFailed) The operation failed to complete. 5 - (orcAborted) The operation is canceled.

func (*Installer) Uninstall

func (i *Installer) Uninstall() error

Uninstall starts a synchronous uninstallation of the updates.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL