jazzyjeff Posted February 10, 2011 Share Posted February 10, 2011 Hello, I am using the AD.au3 UDF and it's working great. For about a year now we have been using a login script created in AutoIT that checks for group membership and maps drives based on that membership. The login script was a constant flow of IF and ELSEIF statements checking the group membership. I have modified this script slightly to now use CASE Statements and sometimes IF statements are used within these statements. I have a couple of users that are a member of the same Security group in AD, and when they login they receive the error message that is attached to this topic. What is a 2147217407 error? My script starts and ends with _AD_Open()/_AD_Close(). Other security groups are fine. Is there a setting in AD itself that is causing this? When I was using this script with the IF statements it worked fine for these users, so it's since I gave them the new login script with the Case statements that this started. Here is a piece of the code that the user should be using: Select Case _AD_IsMemberOf("WSH_Office", @UserName) _StaffDriveExists1() _AppSec() _OfficeShareWSH() _TeacherShareWSH() _StaffHomeDir1() _CreateLogStaffWSH() _StaffDriveChk() _PCChk() _PCModel() EndSelect The functions either map drives or check for diskspace. Any help that can be offered is appreciated. Thanks, Jeff Link to comment Share on other sites More sharing options...
water Posted February 11, 2011 Share Posted February 11, 2011 (edited) Hi, when you changed your logon script, di you change the version of the AD UDF as well? If yes, please try to run the modified logon script with the "old" version of the AD UDF. This way we know that it's a problem with the changes you made or the environment. 2147217407 is no error I have ever seen related to the AD UDF. Do you get a line number so we can check where it happens? Edited February 11, 2011 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
jazzyjeff Posted February 11, 2011 Author Share Posted February 11, 2011 The UDF is the same version, 0.42. Sorry I forgot to attach the error message to this post! :-) Scriptline = -1 That doesn't make it any easier as to where to look. Link to comment Share on other sites More sharing options...
jazzyjeff Posted February 11, 2011 Author Share Posted February 11, 2011 Water, before you waste your time looking into this. I think I have just found a possible explanation. The 2 login scripts that I use are identical in terms of the functions that run. However, I disabled a network card check on the old script that searches the PC for a driver version. It does this via WMI.Searching the web for that error code gave me this result:WMI ErrorI think the error is actually pointing to a problem with the WMI on the local box. This would make sense that it's not an error you've seen with AD.au3 UDF. Thanks for getting back to me. Link to comment Share on other sites More sharing options...
water Posted February 11, 2011 Share Posted February 11, 2011 Glad you could solve the problem!The returned error code 0x8004001 means (according to M$):0x80040001 - OLE_E_ADVF - Invalid advise flags.Whatever that means My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
jazzyjeff Posted February 11, 2011 Author Share Posted February 11, 2011 Just want to let you know that when the WMI function was removed, the script ran without errors. I think the users WMI is corrupt. Their PC hasn't been reimaged since 2007, so a lot of old stuff is on their too. Thanks for your help Water. Link to comment Share on other sites More sharing options...
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