Jump to content

AD Error for login script


 Share

Recommended Posts

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

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 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 - 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 (NEW 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

 

Link to comment
Share on other sites

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 Error

I 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

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 - 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 (NEW 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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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