zenmaster Posted March 13, 2006 Posted March 13, 2006 The following script will retrieve a logged on Users Full DN name from ADS as well as some other trivial info. I need to be able to get a user's Full LDAP name in an AutoIt script. Could somebody show me the AU3 Code to do this? Really only the first 2 lines are relevent for my purpose. (Note: For a number of reasons I don't want to have the VBS script pipe the info back to AU3 and would prefer that AU3 handle the function.) --------------------------------------------------------------------------------------------- Set oADsSysInfo = CreateObject("ADSystemInfo") WScript.Echo "Distinguished name of the current user: " & oADsSysInfo.UserName Wscript.Echo "Domain short name: " & oADsSysInfo.DomainShortName Wscript.Echo "Domain DNS name: " & oADsSysInfo.DomainDNSName Wscript.Echo "Forest DNS name: " & oADsSysInfo.ForestDNSName Wscript.Echo "Domain is in native mode: " & oADsSysInfo.IsNativeMode Wscript.Echo "Location (Site name) of the current computer: " & oADsSysInfo.SiteName WScript.Echo "Distinguished name of the current computer: " & oADsSysInfo.ComputerName
cdkid Posted March 13, 2006 Posted March 13, 2006 Note: needs beta dim $oADsSysInfo = ObjCreate("ADSystemInfo") Msgbox(0,"",$oADsSysInfo.UserName) Beta can be downloaded in the Developers forum in the sticky called "Latest Beta" ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
GaryFrost Posted March 13, 2006 Posted March 13, 2006 might want to search for Scriptomatic in scripts and scraps also for further wmi/ldap calls SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now