Sign in to follow this  
Followers 0
laurin1

Active Directory UDF - Com Error

6 posts in this topic

I just started trying to use this and I am getting this error:

COM Error Encountered in logon.au3

Scriptline = 325

NumberHex = 800700C1

Number = -2147024703

WinDescription =

Description =

Source =

HelpFile =

HelpContext =

LastDllError = 193

Windows 7 x64


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
Share on other sites



I think it might have something to do with this DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1), as if I put it above it, I don't get the com error. However, I am calling this DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1) before I get to th AD call.


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Do you use adfunctions.au3 or my AD UDF?

How do you call the AD functions? Could you please post a code snippet?

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

Do you use adfunctions.au3 or my AD UDF?

How do you call the AD functions? Could you please post a code snippet?

Wasn't aware there was more than one. I'm using your AD.au3 UDF files. I call it like this:

;Functions that need AD calls
_AD_Open("username", "password", "DC=pridedallas,DC=com", "dc01.pridedallas.com", "DC=pridedallas,DC=com") 
MappedDrives()
_AD_Close()

VPN_Route()
DefaultUser()
OpenOffice()
Notepad2()
ScreenSaver()
Icon()
NetTerm()
Office()
Startup()
OwnerInfo()
IE()
SubMaximal()
ProcessExplorer()
ScreenSizeCheck()
Messenger()
ITStatus()

; This function calls DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)
; Many AutoIt functions don't work after that, even if I set it back to 0. Don't put anything down here unless
; needs this
eTrust()

;************************************************************************************************************
Func MappedDrives()

Dim $sDriveLetter

SplashLog('Mapped Drives')

$sDriveLetter = 'P:'

If _AD_IsMemberOf('Peachtree') Then

  If DriveMapGet($sDriveLetter) <> '\\server05\Peachtree' Then

   $iError = DriveMapDel($sDriveLetter)
   WriteLog('Drive mapped to ' & $sDriveLetter & ' deleted - Result: ' & $iError)

   $iError = DriveMapAdd($sDriveLetter, '\\server05\Peachtree', 1)
   WriteLog('Map ' & $sDriveLetter & ' to [url="file://app01/PeachtreeData"]\\app01\PeachtreeData[/url] - Result: ' & $iError)

  EndIf

Else

  $iError = DriveMapDel($sDriveLetter)
  WriteLog('Drive mapped to ' & $sDriveLetter & ' deleted - Result: ' & $iError)

EndIf

EndFunc

Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

Share this post


Link to post
Share on other sites

0x800700C1 means: Not a valid Win32 application

Is the displayed line number somewhere in your script or the AD UDF? If it's in the AD UDF version 0.39 it's at statement

$oAD_Connection = ObjCreate("ADODB.Connection") ; Create COM object to AD

Never have seen this problem before.


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

You are correct, there's a popup that says Com Error and that message, or if I turn debugging on in the AD UDF, then it's in the console, but like 325 is the source.

I'm certain it's because the disable WoW option is breaking the ObjCreate() function's ability to find the necesary files.


Keith Davis

MCSA, ZCE, A+, N+

http://www.laurinkeithdavis.com

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