title: obtain the current username using WMI
body: <p>I am using Win32_NetworkLoginProfile or Win32_Account to get a list of the users for a system. Call to these objects return a lot of users, some local and some belonging to a domain (if the system is part of a domain).</p>
  
  <p>Is there a way to obtain the current user name using WMI?
  If yes, how?</p>
  
  <p>furthermore, using Win32_Account I can check whether the username I am listing is either local or part of a domain. Is there a way to achieve the same for the current user?</p>
  
  <p>The code is in C for Windows XP or newer.</p>
  
  <p>Thank you.</p>