diff --git a/agent-windows/collector/system.go b/agent-windows/collector/system.go index d9f7555..2f7f028 100644 --- a/agent-windows/collector/system.go +++ b/agent-windows/collector/system.go @@ -128,6 +128,13 @@ func getOSVersion() (version, build string) { currentBuild, _, _ := k.GetStringValue("CurrentBuild") ubr, _, _ := k.GetIntegerValue("UBR") + // Windows 11 erkennen: Build >= 22000, aber ProductName sagt noch "Windows 10" + buildNum := 0 + fmt.Sscanf(currentBuild, "%d", &buildNum) + if buildNum >= 22000 && strings.Contains(productName, "Windows 10") { + productName = strings.Replace(productName, "Windows 10", "Windows 11", 1) + } + if displayVersion != "" { version = fmt.Sprintf("%s %s", productName, displayVersion) } else {