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

ADSI
plus

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

Get Current User Path


AddExtender("wwwnt34i.dll")
AddExtender("wwads34i.dll")
CurrentUser=wntUserInfo(0)
ServerDn=dsGetProperty("LDAP://rootDSE", "serverName")
ServerName=ItemExtract(1, ServerDn, ",")
ServerName=ItemExtract(2, ServerName, "=")
ServerDn=dsGetProperty("LDAP://rootDSE", "defaultNamingContext")
ServerPath=StrCat("LDAP://",ServerName,"/",ServerDN)
UserPath=dsFindPath(ServerPath, StrCat("(&(objectCategory=person)(sAMAccountName=",CurrentUser,"))"))
Exit

Article ID:   W16313
File Created: 2006:02:16:11:00:18
Last Updated: 2006:02:16:11:00:18