Skip to content

Commit

Permalink
Add code to get the right version of Windows10 (21H1) and Windows 11. c…
Browse files Browse the repository at this point in the history
…loses #954. closes #918. closes #925.
  • Loading branch information
ddurieux committed Jan 27, 2022
1 parent 5dac6c9 commit a62ce72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/FusionInventory/Agent/Task/Inventory/Win32/OS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a62ce72

Please sign in to comment.