osdetail

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	StatusUnknown uint8 = iota
	StatusRunningStoppable
	StatusRunningNotStoppable
	StatusStartPending
	StatusStopPending
	StatusStopped
)

Service Status

Variables

View Source
var (
	ErrServiceNotFound = errors.New("no service with the given PID was found")
)

Errors

View Source
var (
	ErrServiceNotStoppable = errors.New("the service is not stoppable")
)

Exported errors

Functions

func DisableDNSCache

func DisableDNSCache() error

DisableDNSCache disables the Windows Service "DNS Client" by setting the registry value "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dnscache" to 4 (Disabled). A reboot is required for this setting to take effect.

func EnableColorSupport

func EnableColorSupport() bool

EnableColorSupport tries to enable color support for cmd on windows and returns whether it is enabled.

func EnableDNSCache

func EnableDNSCache() error

EnableDNSCache enables the Windows Service "DNS Client" by setting the registry value "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Dnscache" to 2 (Automatic). A reboot is required for this setting to take effect.

func GetAllServiceNames

func GetAllServiceNames() (map[int32]string, error)

GetAllServiceNames returns a list of service names assosicated with svchost.exe processes on Windows.

func GetServiceNames

func GetServiceNames(pid int32) (string, error)

GetServiceNames returns all service names assosicated with a svchost.exe process on Windows.

func GetServiceStatus

func GetServiceStatus(name string) (status uint8, err error)

GetServiceStatus returns the current status of a Windows Service (limited implementation).

func IsWindowsVersion

func IsWindowsVersion(version string) bool

IsWindowsVersion returns whether the given version matches (HasPrefix) the current Windows version.

func SartService

func SartService(name string) (err error)

SartService starts a Windows Service.

func StopService

func StopService(name string) (err error)

StopService stops a Windows Service.

func WindowsVersion

func WindowsVersion() string

WindowsVersion returns the current Windows version.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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