From a62ce720de25ab1603b7141920cb3cb76264bab2 Mon Sep 17 00:00:00 2001 From: David Durieux Date: Thu, 27 Jan 2022 13:37:43 +0100 Subject: [PATCH] Add code to get the right version of Windows10 (21H1) and Windows 11. closes #954. closes #918. closes #925. --- lib/FusionInventory/Agent/Task/Inventory/Win32/OS.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/FusionInventory/Agent/Task/Inventory/Win32/OS.pm b/lib/FusionInventory/Agent/Task/Inventory/Win32/OS.pm index cea5d07701..febec08c73 100644 --- a/lib/FusionInventory/Agent/Task/Inventory/Win32/OS.pm +++ b/lib/FusionInventory/Agent/Task/Inventory/Win32/OS.pm @@ -91,6 +91,12 @@ sub doInventory { ); $os->{VERSION} = $releaseid if $releaseid; + # Support DisplayVersion as Operating System version for Windows 10 (since version 21H1) & Windows 11 + my $displayVersion = getRegistryValue( + path => 'HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion/DisplayVersion' + ); + $os->{VERSION} = $displayVersion if $displayVersion; + # We want to always reset FQDN on remote wmi inventory as it was set to local # agent fqdn in Generic module $os->{FQDN} = $hostname if ($remotewmi);