Jump to content

Active Directory UDF - Com Error


Recommended Posts

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

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

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

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

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

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

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...