OCSInventory-NG / WindowsAgent

OCS Inventory NG Agent for Windows
http://www.ocsinventory-ng.org/
Other
154 stars 81 forks source link

OCS Agent dectectinf Windows 10 as Windows 8 #278

Open fgendorf opened 1 year ago

fgendorf commented 1 year ago

Reference issue https://github.com/OCSInventory-NG/WindowsAgent/issues/232

General information

Operating system : Windows 10 10.0.19044

OCS Inventory information

Windows agent version : 2.10.1.0

Problem's description

Sometimes the OCS agent send to server the information that Windows 10 are a Windows 8.... I checked and I can see WMI are OK, but the machine was on lockscreen on monitor and another user accessing trough RDC.

steffmeister commented 3 weeks ago

We also have this problem.

My five-minute-analysis (please correct me if I am wrong): It seems the OCS windows agent uses dtwinver (http://www.naughter.com/dtwinver.html) to detect the OS: https://github.com/OCSInventory-NG/WindowsAgent/blob/master/SysInfo/Dtwinver.cpp - but as you can see here this is from April 2019 (a time where Win10 1903 was current). So I guess the dtwinver version in OCS agent has to be updated? Or why not read the version from registry or other sources which require no 3rd party library?

Edit: Ok it seems OCS agent trys to first use WMI and then falls back to dtwinver: https://github.com/OCSInventory-NG/WindowsAgent/blob/master/SysInfo/SysInfo.cpp#L73 So I suppose this is a WMI issue...