water Posted February 7, 2014 Author Posted February 7, 2014 So this means it only takes 1.5 seconds. How do you think it takes 30 seconds? 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
jazzyjeff Posted February 7, 2014 Posted February 7, 2014 We have 3 DNS servers, 250+ security groups, and about 11,000 user accounts. All DC's are Windows 2008.
water Posted February 7, 2014 Author Posted February 7, 2014 I think 1.5 seconds isn't too bad. Did you test with a group that usually takes 30 seconds? 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
jazzyjeff Posted February 7, 2014 Posted February 7, 2014 :-) I think it takes that long, because when I count the time difference between the GUI label changing that tell me it's on one section to get to the next section, it's about 30 seconds. Are you thinking the code is executing, but something else in the script is delaying the process? It seems from this test though, that I probably have some things I need to fix in the login script. Maybe the scrolling marquee progress bar is causing a delay...
jazzyjeff Posted February 7, 2014 Posted February 7, 2014 I did use a security group that is causing the issue. 1.5 seconds is excellent! :-) I'll be pleased if I can get that working.
water Posted February 7, 2014 Author Posted February 7, 2014 Yes, I think checking the group membership is quite fast. So there might be another problem. 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
jazzyjeff Posted February 7, 2014 Posted February 7, 2014 Thanks Water. I'll look elsewhere to find the problem.
water Posted February 7, 2014 Author Posted February 7, 2014 At least we have found a bug in the AD UDF. Thanks for that! 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
denisaurus Posted February 13, 2014 Posted February 13, 2014 The new 1.4 function _AD_AddUserToGroup is not working properly with AutoIt 3.3.10.2, it reports that user is added successfully but nothing's changed in Active Directory. I've tested this without proper credentials to see if it will return correct value, it should not return 1. Please, can you fix this?
water Posted February 13, 2014 Author Posted February 13, 2014 Welcome to Autoit and the forum! Did it work with an older version of the AD UDF and/or and older version of AutoIt? If yes, which one? 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
denisaurus Posted February 13, 2014 Posted February 13, 2014 It worked with 3.3.8.1 and AD.AU3 1.2.2... I didn't test any other functions that are supposed to change attributes yet but reading (even attribute arrays) seems ok. The function is working, I can with proper credentials add user to groups but it returns 1 even if it fails to add user to a group due to insufficient permissions.
water Posted February 13, 2014 Author Posted February 13, 2014 I just compared version 1.2.2.0 and 1.4.0.0 of the UDF. I don't see a bug. Did you use the _AD_AddUserToGroup.au3 example script or something you coded yourself? 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
water Posted February 13, 2014 Author Posted February 13, 2014 I think I found the problem. It's an unhandled error condition. Please change the function as follows: Func _AD_AddUserToGroup($sGroup, $sUser) If Not _AD_ObjectExists($sGroup) Then Return SetError(1, 0, 0) If Not _AD_ObjectExists($sUser) Then Return SetError(2, 0, 0) If _AD_IsMemberOf($sGroup, $sUser) Then Return SetError(3, 0, 0) If StringMid($sGroup, 3, 1) <> "=" Then $sGroup = _AD_SamAccountNameToFQDN($sGroup) ; sAMACccountName provided If StringMid($sUser, 3, 1) <> "=" Then $sUser = _AD_SamAccountNameToFQDN($sUser) ; sAMACccountName provided Local $oUser = __AD_ObjGet("LDAP://" & $sAD_HostServer & "/" & $sUser) ; Retrieve the COM Object for the user Local $oGroup = __AD_ObjGet("LDAP://" & $sAD_HostServer & "/" & $sGroup) ; Retrieve the COM Object for the group $oGroup.Add($oUser.AdsPath) If @error <> 0 Then Return SetError(@error, 0, 0) ; <==== ADD THIS LINE! $oGroup.SetInfo If @error <> 0 Then Return SetError(@error, 0, 0) Return 1 EndFunc ;==>_AD_AddUserToGroup denisaurus 1 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
denisaurus Posted February 17, 2014 Posted February 17, 2014 Great! Now It's working as it should... Really fast response!
water Posted February 17, 2014 Author Posted February 17, 2014 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
denisaurus Posted February 17, 2014 Posted February 17, 2014 Sorry to bug you but there is a similar problem with _AD_RemoveUserFromGroup function. I know how to fix this thanks to your advice but I think that you just might want to know that.
water Posted February 17, 2014 Author Posted February 17, 2014 (edited) Thanks a lot for this information! Looks like the modifications done in 3.3.10.x to the COM error handler now show a lot of bugs in the AD UDF I think I'll need to release a 1.4.1.0 version quite soon Edited February 17, 2014 by water 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
water Posted February 17, 2014 Author Posted February 17, 2014 Version 1.4.1.0 (Bug fix) of the UDF has been released.Only runs with AutoIt 3.3.10.2 and later.Please test before using in production!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
zolive Posted February 18, 2014 Posted February 18, 2014 Hello,I just downloaded your include for autoit which have awesome.But I have the read me file it asks me to AD.AU3 in the% ProgramFiles% AutoIt3 Include c it is good but I can not find the files and au3.user.calltips.api au3.userudfs.properties .For help in autoit.You can put in download or tell me how to find them. thank youExcuse my english I'm french
water Posted February 18, 2014 Author Posted February 18, 2014 Bon jour et Welcome to Autoit and the forum! My bad, I didn't include the latest Readme.txt with the 1.4.1.0 version of the UDF. There is no need to add the UDF to %ProgramFiles%... any more. The Readme.txt now describes what has to be done: How to "install" the Active Directory UDF 2014-02-08 -------------------------------------------------------------------------- This step is mandatory * Copy AD.au3 into the %ProgramFiles%AutoIt3Include, the AutoIt User Includes directory or the directory where your script is located For SciTE integration (user calltips and syntax highlighting) * Run the User CallTip Manager from SciTE Config tool, tab Other Tools. For details please check: http://www.autoitscript.com/wiki/Adding_UDFs_to_AutoIt_and_SciTE Help files and examples * Copy the *.htm and the remaining *.au3 files to any directory you like. You can't call the help and example scripts from the AutoIt help at the moment 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
Recommended Posts