Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
;Requires Windows XP or Windows 2000 Professional. adSys = ObjectOpen("ADSystemInfo") ;Retrieves the Active Directory distinguished name of the current user, which is the logged-on user ;or the user impersonated by the calling thread. userName = adSys.UserName Message("Username",userName) ;Retrieves the distinguished name of the local computer. Computername = adSys.Computername Message("Computername",Computername) ;Retrieves the DNS name of the local computer's domain, for example "example.fabrikam.com". DomainDNSName = adSys.DomainDNSName Message("DomainDNSName",DomainDNSName) ;Retrieves the short name of the local computer's domain, for example "myDom". DomainShortName = adSys.DomainShortName Message("DomainShortName",DomainShortName) ;Retrieves the DNS name of the local computer's forest. ForestDNSName = adSys.ForestDNSName Message("ForestDNSName",ForestDNSName) ;Determines whether the local computer's domain is in native or mixed mode. IsNativeMode = adSys.IsNativeMode Message("IsNativeMode",IsNativeMode) ;Retrieves the distinguished name of the NTDS-DSA object for the DC that owns the ;primary domain controller role in the local computer's domain. PDCRoleOwner = adSys.PDCRoleOwner Message("PDCRoleOwner",PDCRoleOwner) ;Retrieves the distinguished name of the NTDS-DSA object for the DC that owns the schema role in the local computer's forest. SchemaRoleOwner = adSys.SchemaRoleOwner Message("SchemaRoleOwner",SchemaRoleOwner) ;Retrieves the site name of the local computer. SiteName = adSys.SiteName Message("SiteName",SiteName) ObjectClose(adSys)
Article ID: W16087
File Created: 2004:03:30:15:42:46
Last Updated: 2004:03:30:15:42:46