Sign in to follow this  
Followers 0
jazzyjeff

AD Error for login script

6 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

The UDF is the same version, 0.42.

Sorry I forgot to attach the error message to this post! :-)

post-54196-0-58602900-1297425591_thumb.j

Scriptline = -1

That doesn't make it any easier as to where to look.

Share this post


Link to post
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.

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0