Sign in to follow this  
Followers 0
snaileater

ADSI com objects ... ?

3 posts in this topic

I've read that ADSI (Active Directory Service Interfaces...) can be used by any programming language that can call automation/COM objects.

Is it the case of AutoIt or is it only possible with tools like VB apps and WSH ?

all the tries i made in order to create ADSI object like :

$object = ObjCreate("WinNT://" & "MyDomain")

failed.

How come ?

Thanks for ur help !

Share this post


Link to post
Share on other sites



First, by intent and design you should be able to exercise any of the COM interfaces from AutoIt as you would from another language -- COM support is still beta however.

Next, all of the examples I've seen for the WinNT namespace in ADSI use Get instead of Create, so you might check out ObjGet instead of ObjCreate.

Third, please provide more information in posts like this and others that you have made recently. You'll find that if you take a moment longer to tell us what version of AutoIt you are running, give specific error messages and a stand-alone example of your code (although in this case it is enough) you'll get much better answers.

Also, since the COM code is in beta, if you could test something like this in a language such as VBScript first it would help isolate whether the trouble is correct usage of the COM object or whether it is an issue specific to AutoIt.

Thanks,

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

I've read that ADSI (Active Directory Service Interfaces...) can be used by any programming language that can call automation/COM objects.

Is it the case of AutoIt or is it only possible with tools like VB apps and WSH ?

all the tries i made in order to create ADSI object like :

$object = ObjCreate("WinNT://" & "MyDomain")

failed.

How come ?

Thanks for ur help !

<{POST_SNAPBACK}>

Using ADSI is no problem when you use the latest beta version of AutoIt3. DaleHohm is right: you have to use ObjGet(), because the object is already present in the system and does not have to be 'created'.

Some WINNT examples are available in the tests\com directory of the beta AutoIt3 ZIP file. When accessing ADS you have to use an LDAP moniker like:

$objGroup = ObjGet("LDAP://CN=SampleGroup,OU=Groups,OU=TM,DC=department,DC=company,DC=country" )    

$objGroup.GetInfo

$MemberOf = $objGroup.Members    ;Get the members of this group

$UserArray[0]="user"
$MemberOf.Filter = $UserArray       ;We need only User objects

..etc..

Regards,

-Sven

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0