Comment 7 for bug 1292020

Revision history for this message
Hans Wurst (coding-v) wrote :

We had the same problem on machines running version 2.1.0.3.

However by using the latest source, the user gets reported correctly again.

Turned out that revision 490 (a fix for https://bugs.launchpad.net/ocsinventory-windows-agent/+bug/1300172) also seems to fix this problem.

--- SysInfo/SysInfo.cpp 2014-03-10 12:55:35 +0000
+++ SysInfo/SysInfo.cpp 2014-04-15 14:11:06 +0000
@@ -630,9 +630,11 @@
  TCHAR szUserName[255];
  DWORD dwUserName = 255;

+/* Don't use this code, it list all users connected on Domain controlers and uses 100% CPU
  // First, try WMI
  if (m_wmiInfo.IsConnected() && m_wmiInfo.GetLoggedOnUser( csUserName))
   return TRUE;
+*/
  // Then, try to find user running explorer.exe process
  if (getUserNameFromExplorerProcess( csUserName))
   return TRUE;