RainMakker
asked on
How do I get the GUID of the currently logged in user?
I would like to be able to get the Active Directory GUID of the logged in user from the windows registry. I see my GUID in:
HLM\SOFTWARE\Microsoft\Win dows NT\CurrentVersion\ProfileL ist\*\<gui d>
But looking through all of these values to see if the "ProfileImagePath" matches the logged in user name seems goofy. I can easily get the logged in user name with my Delphi app, so this is very doable, but it seems a strange way to go about it.
Any suggestions?
HLM\SOFTWARE\Microsoft\Win
But looking through all of these values to see if the "ProfileImagePath" matches the logged in user name seems goofy. I can easily get the logged in user name with my Delphi app, so this is very doable, but it seems a strange way to go about it.
Any suggestions?
ASKER
Thanks, but . . .
1. The first one gets users logging into a remote computer. I need the user logged into the local machine.
2. The second gets the GUID from Active Directory, I need the GUID from the local machine to validate against active directory.
3. I really need to make this work within my computer, not in a command window.
1. The first one gets users logging into a remote computer. I need the user logged into the local machine.
2. The second gets the GUID from Active Directory, I need the GUID from the local machine to validate against active directory.
3. I really need to make this work within my computer, not in a command window.
Please take a look at theroadtodelphi blog. This is a good delphi resource. Using ADSI interface - you should be able to get a lots of information about AD without to dig in registry.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No other answer helped.
http://gallery.technet.microsoft.com/scriptcenter/f053de86-f053-474b-9b21-f2e6b161948f
http://community.spiceworks.com/scripts/show/1910-get-user-s-guid-from-active-directory