11-03-2010 03:30 PM
I can get the UserName (aSAMAccountName or otherwise) on a Windows 7 PC pretty easily (from the environment variables), but I need to get the CommonName so I can do some active directory queires - anyone know how to do this?
I've attached an example that gets the active directory groups of a user - problem is, I can't get the CommonName to input into it (eg: on my domain, my UserName is "christopher_relf" which doesn't work, my CommonName is "christopher relf" which works fine).
11-04-2010 06:36 PM
Hi Christopher,
I think I've figured out what you're getting here. Your VI works on my Windows 7 machine when I enter what I'm assuming is my CommonName (first initial and last name), but doesn't work when I enter what I'm assuming is my UserName (my full name). Just to make sure we're on the same page, I think you're saying that the UserName is what appears in the top right corner of the Windows Start menu, and the CommonName is the name of the folder in C:\Users, along with Default, Admin, etc.
Are you just trying to find a way to locate this name at all (i.e. the folder in C:\Users), or do you need to locate it programmatically?
11-05-2010 08:01 AM
Thanks for your help Andy, but the question has already been answered on the LAVA thread.