WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

wNT
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Matching SID to ProfileList folder

Keywords: 	  Matching SID ProfileList folder  wntAcctInfo

Question:

I am trying to retrieve a users SID and match it up to the user ProfileList folder in the registry (IE: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-1109269927-665796172-1543857936-1860)

However, the "S-1-5-..." isn't the user's SID (even tho it looks like it. Not sure what the tech name for it is). However, there is a Value inside each folder to called "SID". I'm assuming that is the person's true SID.

Question: Is there a way to convert this Binary value into the alphanumberic string that we are used to seeing? I want to be able to said this SID matches up to the ProfileList key.

Answer:

You can call wntAcctInfo() in the NT extender to convert between a SID value and an account name. The example code in the helpfile for that function shows you exactly what you want to do. Also, follow the link in the "See Also" section [for nwAcctInfo()'s help text] that points to a discussion regarding SID values and how to interpret them & manipulate them.
Article ID:   W15197
File Created: 2002:09:05:13:50:32
Last Updated: 2002:09:05:13:50:32