scmrexec

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "SCMR"

	DefaultEndpoint = "ncacn_np:[svcctl]"
	ScmrUuid        = "367ABB81-9844-35F1-AD32-98F038001003"
)
View Source
const (
	ErrorServiceRequestTimeout uint32 = 0x0000041d
	ErrorServiceNotActive      uint32 = 0x00000426

	ServiceDemandStart     uint32 = 0x00000003
	ServiceWin32OwnProcess uint32 = 0x00000010

	ServiceQueryConfig     uint32 = 0x00000001
	ServiceChangeConfig    uint32 = 0x00000002
	ServiceStart           uint32 = 0x00000010
	ServiceStop            uint32 = 0x00000020
	ServiceDelete          uint32 = 0x00010000 // special permission
	ServiceControlStop     uint32 = 0x00000001
	ScManagerCreateService uint32 = 0x00000002

	ServiceDeleteAccess = ServiceDelete
	ServiceModifyAccess = ServiceQueryConfig | ServiceChangeConfig | ServiceStop | ServiceStart | ServiceDelete
	ServiceCreateAccess = ScManagerCreateService | ServiceStart | ServiceStop | ServiceDelete
	ServiceAllAccess    = ServiceCreateAccess | ServiceModifyAccess
)
View Source
const (
	MethodChange = "Change"
)
View Source
const (
	MethodCreate = "Create"
)
View Source
const (
	MethodDelete = "Delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Scmr

type Scmr struct {
	goexec.Cleaner

	Client *dce.Client
	// contains filtered or unexported fields
}

func (*Scmr) Connect

func (m *Scmr) Connect(ctx context.Context) (err error)

func (*Scmr) Init

func (m *Scmr) Init(ctx context.Context) (err error)

func (*Scmr) Reconnect

func (m *Scmr) Reconnect(ctx context.Context) (err error)

type ScmrChange

type ScmrChange struct {
	Scmr
	goexec.Cleaner
	goexec.Executor

	IO goexec.ExecutionIO

	NoStart     bool
	NoRevert    bool
	ServiceName string
}

func (*ScmrChange) Execute

func (m *ScmrChange) Execute(ctx context.Context, in *goexec.ExecutionIO) (err error)

type ScmrCreate

type ScmrCreate struct {
	Scmr
	goexec.Cleaner
	goexec.Executor

	IO goexec.ExecutionIO

	NoDelete    bool
	NoStart     bool
	ServiceName string
	DisplayName string
}

func (*ScmrCreate) Execute

func (m *ScmrCreate) Execute(ctx context.Context, in *goexec.ExecutionIO) (err error)

type ScmrDelete

type ScmrDelete struct {
	Scmr
	goexec.Cleaner

	IO goexec.ExecutionIO

	ServiceName string
}

func (*ScmrDelete) Call

func (m *ScmrDelete) Call(ctx context.Context) (err error)

Jump to

Keyboard shortcuts

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