Jump to content

Recommended Posts

Posted
:D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Hi ya, I am very new to this site and have very basic skills at scripting.

I am simply trying to use the lastest Active Directory UDF but do not know how to implement it into AutoIt.

There is a downloadable Zip file, AD1.3.0.0 and I simply don't know what to do with it.

Any help will be greatly apprecated.

With Warm Regards,

Andreas

Posted

The ZIP file contains the following files:

  • Ad.au3 - the UDF itself. This needs to be included by your script
  • _AD_*.au3 - Example scripts for every function. Ready to run
  • _AD_*.htm - Help files for every function. Ready to run
  • default.css - Cascading Style Sheet used by the htm files
  • au3.userudfs.properties - List of functions to be used by the SciTE editor
  • au3.user.calltips.api - Calltips used by the SciTE Editor
  • ReadMe.txt - Contains the description how to "install" the UDF
  • History.txt - As the name says
Download the ZIP file, unpack it to a temporary directory and read the ReadMe.txt.

If you still have questions I will be happy to help.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

  • 2 weeks later...
Posted (edited)

Great excuses. Function _AD_DisablePasswordExpire works perfectly. But Func _AD_DisablePasswordChange doesnt work at all :(

After

$Result = _AD_DisablePasswordChange("username")
ConsoleWrite("Result: " & $Result & ", error: " & @error & ", extended: " & @extended)

i have Result: 0, error: -2147352567, extended: 0

Thank you for support.

I am having this issue (Error -2147352567) when I set _AD_SetPassword to something. Do you know what permissions need to be delegated in Active directory in order to _AD_SetPassword?

Also, just to add that this user is able to reset the password using Active Directory Users and Computers, but I am unable to use the _AD_SetPassword script. Please help.

Edited by bartekd
Posted

Which version of the UDF do you use? Which AutoIt version do you run?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Version 0.41 of the UDF is very, very old. Please download the current version 1.3.0.0.

For download please see my signature.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Which functions do you have in mind? The history shows a few script breaking changes - but for some "exotic" functions.

Version 0.41 has a serious connection bug so I strongly recommend to upgrade to the latest version.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted (edited)

First one that I notice when I replaced my version

When I try to find a user, I use this. It comes back with no users could be found

$aList = _AD_GetObjectsInOU("", "(&(objectCategory=person)(objectClass=user)(|((displayName=*" & $SearchUser & "*)(name=*" & $SearchUser & "*)(cn=*" & $SearchUser & "*)(anr=" & $SearchUser & "))))", 2, "displayname,sAMAccountName");Part of name

When I reset or unlock a user, it can't find the user. I do everything based on the username of the person

Edited by bartekd
Posted

No changes have been made to _AD_GetObjectsInOU that would affect the way you use the function.

What's the value of @error after you have called the function?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

This runs fine here. Could you try and post the result you get on the SciTE console?

#include <ad.au3>
_AD_Open()
ConsoleWrite(@error & "-" & @extended & @LF)
Global $SearchUser = "Thomas"
Global $aList = _AD_GetObjectsInOU("", "(&(objectCategory=person)(objectClass=user)(|((displayName=*" & $SearchUser & "*)(name=*" & $SearchUser & "*)(cn=*" & $SearchUser & "*)(anr=" & $SearchUser & "))))", 2, "displayname,sAMAccountName")
ConsoleWrite(@error & "-" & @extended & @LF)
_ArrayDisplay($aList)
_AD_Close()

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted (edited)

Strange, when I run your script alone, it runs fine, but when I put your exact lines in my script, I get this

2-169

Could it be conflicting with any of the same variable names?

Edited by bartekd
Posted

Very strange. Can you post your script?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

I think I figured it out. If I have any other errorhandler, it will give this issue, If I disable the error handlers that I have, it works fine.

Do you know if there was any changes to the error handler in your UDF? If so, how do I either disable it, or have it work in addition to my current 2 error handlers?

Posted

When you call _AD_Open and run AutoIt version < 3.3.9.2 then the COM error handler of the UDF is enabled - if you haven't already defined a COM error handler.

Define your COM error handler before calling _AD_Open and the AD COM Error handler will not be activated.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted (edited)

Still doesn't seem to work. Here is an example. I know I don't need the IE error handler in this example, but I am registering it to see if it causes issues.

#include <IE.au3>

_IEErrorHandlerRegister()

#include <ad.au3>
_AD_Open()
ConsoleWrite(@error & "-" & @extended & @LF)
Global $SearchUser = "thomas"
Global $aList = _AD_GetObjectsInOU("", "(&(objectCategory=person)(objectClass=user)(|((displayName=*" & $SearchUser & "*)(name=*" & $SearchUser & "*)(cn=*" & $SearchUser & "*)(anr=" & $SearchUser & "))))", 2, "displayname,sAMAccountName")
ConsoleWrite(@error & "-" & @extended & @LF)
_ArrayDisplay($aList)
_AD_Close()
Edited by bartekd
Posted

Found the problem. Please replace line

If $__iAD_Debug = 0 And Number(StringReplace(@AutoItVersion, ".", "")) < 3392 Then _AD_ErrorNotify(1)
in function _AD_Open with
If $__iAD_Debug = 0 And Number(StringReplace(@AutoItVersion, ".", "")) < 3392 Then
    _AD_ErrorNotify(1)
    SetError(0)
EndIf

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

Nice, Thanks. That seems to have done the trick, I am able to use the new version now. :)

But going back to the original problem, it is still there. Do you know what rights need to be delegated to the user in order to setpassword?

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...