wmi icon indicating copy to clipboard operation
wmi copied to clipboard

WMI for Go

Results 15 wmi issues
Sort by recently updated
recently updated
newest added

Hi, I'm facing memory leak issues when querying the Windows Event Log through this lib. I'm new to Golang so properly I'm just doing something wrong. I found the issues...

![image](https://user-images.githubusercontent.com/928600/125413865-56635a07-0593-4cdf-acdd-80c7ffdc418e.png) If oleutil.CallMethod returns error, which is very possible in a high WMI load situations, then we do not release "wmi" or "unknown" objects. Also we are not able to...

I have a script with next part: ``` type Win32_Processor struct { LoadPercentage uint16 L2CacheSize uint32 Family uint16 Manufacturer string Name string NumberOfLogicalProcessors uint32 ProcessorId string Stepping *string MaxClockSpeed uint32...

go get github.com/StackExchange/wmi failed, the error is: go: github.com/StackExchange/wmi upgrade => v0.0.0-20210708210415-b284ef6ab838 go get: github.com/StackExchange/[email protected]: parsing go.mod: module declares its path as: wmi but was required as: github.com/StackExchange/wmi can you...

How to call the method of the class For example, Win32_NetworkAdapterConfiguration SetDNSServerSearchOrder The following method is invalid _, err = wmi.CallMethod([]interface{}{}, fmt.Sprintf(`Win32_NetworkAdapterConfiguration.ServiceName="%s"`, iName), "SetDNSServerSearchOrder", params) // Invalid object path

please add []map[string]interface{} to list of available types and when sutch object is transmitted load all available values to that map like as encoding/json.

Hi, First, thanks a lot for this library, it's pretty useful to access easily data through wmi query. We have one issue with some wmi class (Win32_Fan in our case,...

As part of troubleshooting [an issue](https://github.com/martinlindhe/wmi_exporter/issues/388) encountered with [wmi_exporter](https://github.com/martinlindhe/wmi_exporter), I tried running the [provided code example](https://github.com/StackExchange/wmi/blob/master/wmi.go#L8) which queries Win32_Process: ``` package main import ( "github.com/StackExchange/wmi" "log" ) type Win32_Process struct...

``` C:\...\src\project>go run main.go # project/vendor/github.com/StackExchange/wmi vendor\github.com\StackExchange\wmi\wmi.go:377:22: safeArray.ToValueArray undefined (type *ole.SafeArrayConversion has no field or method ToValueArray) ```

```go type Win32_VolumeChangeEvent struct { EventType uint16 DriveName string } func main() { var dst []Win32_VolumeChangeEvent q := wmi.CreateQuery(&dst, "") fmt.Println(q) for { err := wmi.Query(q, &dst) if err !=...