Skip to content

Commit

Permalink
Merge pull request #988 from fusioninventory/develop+fix_windows10-11…
Browse files Browse the repository at this point in the history
…-version

Add code to get the right version of Windows10 (21H1) and Windows 11.…
  • Loading branch information
ddurieux authored Jan 27, 2022
2 parents 5dac6c9 + a62ce72 commit b839fd5
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 b839fd5

Please sign in to comment.