water Posted January 12, 2012 Posted January 12, 2012 Typo on my side. Should be: #include<AD.au3> $iAD_Debug = 2 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
mik3 Posted January 12, 2012 Author Posted January 12, 2012 This is what I get when I run the tool.http://postimage.org/image/s40o98krb/
water Posted January 12, 2012 Posted January 12, 2012 But isn't this the same error we already solved by installing version 3.3.8.0 of AutoIt? 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
mik3 Posted January 12, 2012 Author Posted January 12, 2012 I think before the error occurred when I tried to perform a task in the tool.
mik3 Posted January 12, 2012 Author Posted January 12, 2012 http://postimage.org/image/s2qbjn6qz/This is how I edited the file.
water Posted January 12, 2012 Posted January 12, 2012 (edited) That's wrong. It should be "$iAD_Debug = 2". Here is my compiled exe which just runs fine and includes the debug option. Could you give this a try? <Attachment deleted> Edited January 12, 2012 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
mik3 Posted January 12, 2012 Author Posted January 12, 2012 It does not create a computer account. There is no error.
water Posted January 12, 2012 Posted January 12, 2012 Seems to be a global problem. A test script which connects to the AD runs fine when run from SciTE but gives an error when run compiled. I have to do some more testing and will come back as soon as I have a solution. Stay tuned ... 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 January 17, 2012 Posted January 17, 2012 I was able to solve the global problem - was caused by my installation. At the moment I'm not sure how to diagnose the problems you see. I can't recreate the situation because I only have read access to our AD. I will think about it and hope to come up with a solution as soon as I find some spare time - I'm quite busy 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
water Posted January 23, 2012 Posted January 23, 2012 Sorry for the long delay ... was quite busy releasing the first beta of our ExcelChart UDF. I hope to come up with a test script in a few days. 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 January 26, 2012 Posted January 26, 2012 (edited) I have created a small test script so we can more easily see where the problem is. Could you please fill in the variables, run the script and post the result? #include <ad.au3> Global $AdminUserName = "" ; Username with permissions to create computer accounts and set permisisons on the computer account in AD Global $AdminUserPassword = "" ; Password Global $DomainName = "" ; Optional: Domain name e.g. DC=microsoft,DC=com Global $DomainController = "" ; Optional: Name of Domain Controller e.g.DC-Server1.microsoft.com Global $ConfigurationContext = "" ; Optional: Configuration naming context e.g. CN=Configuration,DC=microsoft,DC=com Global $OU = "" ; Organizational unit to create the computer account in e.g. OU=Computer_Accounts,DC=microsoft,DC=com Global $ComputerName = "" ; Name of the computer account to create. SamAccountName without trailing "$" e.g. C0001 Global $Usergroup = "" ; Name of the user account or group to join the physical computer to the domain _AD_Open($AdminUserName, $AdminUserPassword, $DomainName, $DomainController, $ConfigurationContext) If @error Then Exit MsgBox(16, "ADAT", "_AD_Open: @error: " & @error & ", @extended: " & @extended) _AD_CreateComputer($OU, $ComputerName, $Usergroup) If @error Then Exit MsgBox(16, "ADAT", "_AD_Open: @error: " & @error & ", @extended: " & @extended) MsgBox(64, "ADAT", "Computer successfully created!") _AD_Close() Edited January 26, 2012 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
mik3 Posted February 1, 2012 Author Posted February 1, 2012 Got an error.http://static.inky.ws/image/1219/image.jpg
mik3 Posted February 1, 2012 Author Posted February 1, 2012 (edited) I did upgrade autoit to 3.3.8.1 I did not touch SciTE Edited February 1, 2012 by mik3
water Posted February 1, 2012 Posted February 1, 2012 Very strange. @error = 1 means that there was a problem installing the COM error handler. That's why we didn't get any COM errors whenc alling _AD_CreateComputer. Do you have a computer with AutoIt 3.3.6.1 installed where you can test the above code? 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
mik3 Posted February 1, 2012 Author Posted February 1, 2012 I can unistall 3.3.8.1 and install that one.
water Posted February 1, 2012 Posted February 1, 2012 The last problem was caused by a typo Could you please fill all the variables with your data and run the script again?#include <ad.au3> Global $AdminUserName = "" ; Username with permissions to create computer accounts and set permisisons on the computer account in AD Global $AdminUserPassword = "" ; Password Global $DomainName = "" ; Optional: Domain name e.g. DC=microsoft,DC=com Global $DomainController = "" ; Optional: Name of Domain Controller e.g.DC-Server1.microsoft.com Global $ConfigurationContext = "" ; Optional: Configuration naming context e.g. CN=Configuration,DC=microsoft,DC=com Global $OU = "" ; Organizational unit to create the computer account in e.g. OU=Computer_Accounts,DC=microsoft,DC=com Global $ComputerName = "" ; Name of the computer account to create. SamAccountName without trailing "$" e.g. C0001 Global $Usergroup = "" ; Name of the user account or group to join the physical computer to the domain _AD_Open($AdminUserName, $AdminUserPassword, $DomainName, $DomainController, $ConfigurationContext) If @error Then Exit MsgBox(16, "ADAT", "_AD_Open: @error: " & @error & ", @extended: " & @extended) _AD_CreateComputer($OU, $ComputerName, $Usergroup) If @error Then Exit MsgBox(16, "ADAT", "_AD_CreateComputer: @error: " & @error & ", @extended: " & @extended) MsgBox(64, "ADAT", "Computer successfully created!") _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
mik3 Posted February 1, 2012 Author Posted February 1, 2012 another error.http://static.inky.ws/image/1221/image.jpg
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