msi

package
v0.0.0-...-7b535eb Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInstallParams

func NewInstallParams(msiInstallParams ...InstallAgentOption) []string

NewInstallParams instantiates a new InstallAgentParams and runs all the given InstallAgentOption Example usage:

awshost.WithAgentOptions(
  agentparams.WithAdditionalInstallParameters(
	msiparams.NewInstallParams(
		msiparams.WithAgentUser(fmt.Sprintf("%s\\%s", TestDomain, TestUser)),
		msiparams.WithAgentUserPassword(TestPassword)))),

Types

type InstallAgentOption

type InstallAgentOption = func(*InstallAgentParams)

InstallAgentOption is an optional function parameter type for InstallAgentParams options

func WithAgentUser

func WithAgentUser(username string) InstallAgentOption

WithAgentUser specifies the DDAGENTUSER_NAME parameter.

func WithAgentUserPassword

func WithAgentUserPassword(password string) InstallAgentOption

WithAgentUserPassword specifies the DDAGENTUSER_PASSWORD parameter.

func WithDdURL

func WithDdURL(ddURL string) InstallAgentOption

WithDdURL specifies the DD_URL parameter.

func WithFakeIntake

func WithFakeIntake(fakeIntake *fakeintake.FakeintakeOutput) InstallAgentOption

WithFakeIntake configures the Agent to use a fake intake URL.

func WithInstallLogFile

func WithInstallLogFile(logFileName string) InstallAgentOption

WithInstallLogFile specifies the file where to save the MSI install logs.

func WithSite

func WithSite(site string) InstallAgentOption

WithSite specifies the SITE parameter.

type InstallAgentParams

type InstallAgentParams struct {
	AgentUser         string `installer_arg:"DDAGENTUSER_NAME"`
	AgentUserPassword string `installer_arg:"DDAGENTUSER_PASSWORD"`
	DdURL             string `installer_arg:"DD_URL"`
	Site              string `installer_arg:"SITE"`
	InstallLogFile    string `installer_arg:"/log"`
}

InstallAgentParams are the parameters used for installing the Agent using msiexec.

func (*InstallAgentParams) ToArgs

func (p *InstallAgentParams) ToArgs() []string

ToArgs convert the params to a list of valid msi switches, based on the `installer_arg` tag

Jump to

Keyboard shortcuts

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