windowsupdate

package module
v0.0.0-...-5075a80 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: MIT Imports: 3 Imported by: 0

README

windowsupdate

A library written in Go using go-ole/go-ole and Windows Update Agent API.

I am not intended to cover all APIs in Windows Update Agent API. I'd rather implement minimal features for my use cases.

License

MIT

Documentation

Index

Constants

View Source
const (
	OrcNotStarted          = 0
	OrcInProgress          = 1
	OrcSucceeded           = 2
	OrcSucceededWithErrors = 3
	OrcFailed              = 4
	OrcAborted             = 5
)

Variables

View Source
var UpdateNotFoundError = errors.New("Update not found")

Functions

func InstallImportantUpdates

func InstallImportantUpdates() (updatesToInstall []Update, result InstallationResult, err error)

Types

type IUpdateIdentity

type IUpdateIdentity struct {
	RevisionNumber int32
	UpdateID       string
}

type InstallationResult

type InstallationResult struct {
	RebootRequired bool
	ResultCode     int
	UpdateResults  []UpdateResult
	// contains filtered or unexported fields
}

type Session

type Session ole.IDispatch

func NewSession

func NewSession() (*Session, error)

func (*Session) Download

func (s *Session) Download(updates []Update) error

func (*Session) FindByUpdateID

func (s *Session) FindByUpdateID(updateID string) (Update, error)

func (*Session) Install

func (s *Session) Install(updates []Update) (InstallationResult, error)

func (*Session) Release

func (s *Session) Release()

func (*Session) Search

func (s *Session) Search(criteria string) ([]Update, error)

type Update

type Update struct {
	Identity     IUpdateIdentity
	Title        string
	IsDownloaded bool
	IsInstalled  bool
	// contains filtered or unexported fields
}

type UpdateResult

type UpdateResult struct {
	RebootRequired bool
	ResultCode     int
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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