wutil

package
v0.0.0-...-fae333e Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropPrivilegeStartProcess

func DropPrivilegeStartProcess(name string, arg ...string) (err error)

DropPrivilegeStartProcess ...

func GetFileVersion

func GetFileVersion(file string) string

GetFileVersion 获取文件版本信息

func GetGeneralPID

func GetGeneralPID() (pid uint)

GetGeneralPID 获取普通权限进程的PID

func GetMaxFreePartition

func GetMaxFreePartition() (ret string)

GetMaxFreePartition 获取最大分区

func GetProcessPID

func GetProcessPID(name string) (ret uint)

GetProcessPID ...

func GetProcessToken

func GetProcessToken(pid uintptr) (hNewToken w32.HANDLE)

GetProcessToken ...

func IsAdminPrivilege

func IsAdminPrivilege() bool

IsAdminPrivilege 是否具有管理员权限

func IsHighWin7Sp1

func IsHighWin7Sp1() bool

IsHighWin7Sp1 ...

func IsInstalled

func IsInstalled(name string) bool

IsInstalled ..

func IsProcessRuning

func IsProcessRuning(names ...string) (bret bool)

IsProcessRuning ...

func LoadAppList

func LoadAppList() (ret map[string]string)

LoadAppList ...

func ProcessWalk

func ProcessWalk(fun func(w32.PROCESSENTRY32) bool)

ProcessWalk 遍历进程表

func StartAdminProcess

func StartAdminProcess(path string, arg []string) (pid uint, handle w32.HANDLE)

StartAdminProcess UAC启动

func StartTokenProcess

func StartTokenProcess(hPtoken w32.HANDLE, cmd string) (pid uint)

StartTokenProcess ...

Types

type DiskStatus

type DiskStatus struct {
	All  uint64
	Used uint64
	Free uint64
}

DiskStatus 磁盘信息

func DiskUsage

func DiskUsage(path string) (disk DiskStatus, bret bool)

DiskUsage 获取路径的磁盘信息

type UwpAppDesc

type UwpAppDesc struct {
	WorkDir       string
	ContainerName string
	DisplayName   string
	PackageName   string
	Desc          string
	ExePath       string
}

UwpAppDesc ...

func LoadUWPDesc

func LoadUWPDesc(name string) (bret bool, desc UwpAppDesc)

LoadUWPDesc ...

Jump to

Keyboard shortcuts

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