+/* 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;
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/ocsinvento ry-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 IsConnected( ) && m_wmiInfo. GetLoggedOnUser ( csUserName)) mExplorerProces s( csUserName))
// First, try WMI
if (m_wmiInfo.
return TRUE;
+*/
// Then, try to find user running explorer.exe process
if (getUserNameFro
return TRUE;