Jump to content

Active Directory UDF - Help & Support (III)


Recommended Posts

  • Replies 835
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Could you please add the following function to your script and call _AD_ListDomainControllersEX instead of _AD_ListDomainControllers? The error should be gone. ; #FUNCTION# ==================

Fixed in the 1.5.0.1 version of the UDF which I uploaded today.

& stands for AND | stands for OR You are looking for groups whose name start with APZ_ OR APPL_ OR CPZ_PRD_. The syntax gets a bit more complex now: "(&(objectcategory=group)(|(na

Posted Images

The UDF keeps the connection open until you close it.

Could you use a

Consolewrite(@MIN & ":" & @SEC & "." & @MSEC & @LF)

after each call to a _AD_* function so we know where the time is being spent?

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 post
Share on other sites

Hi, the function _AD_IsObjectLocked does always return 0
 

This code ist working:

Func _IsObjectLocked($sFQDN)
    $objuser = ObjGet("LDAP://" & $sFQDN)
    $objLockout = $objUser.get("lockouttime")

    If Not IsObj($objLockout) Then Return ;not locked

    If $objLockout.lowpart = 0 And $objLockout.highpart = 0 Then
        Return ;not locked
    Else
        Return 1 ;locked
    EndIf
EndFunc

Maybe you can merge this somehow...

Link to post
Share on other sites

Which version of the UDF do you use?

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 post
Share on other sites

Did it work with an older version of the UDF?

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 post
Share on other sites

Never mind. It should work with the current version anyway.

Can you please post the code you use with _AD_IsObjectLocked?

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 post
Share on other sites

Never mind. It should work with the current version anyway.

Can you please post the code you use with _AD_IsObjectLocked?

#include <AD.au3>

_AD_Open()

If _AD_IsObjectLocked("timtest") Then
    ConsoleWrite("locked" & @CRLF)
Else
    ConsoleWrite("not locked" & @CRLF)
EndIf

_AD_Close()

Always "not locked" !!!

BTW the other function _AD_UnlockObject() works fine.

Edited by Tim33
Link to post
Share on other sites

Could you try this and post the result?

#include <AD.au3>

_AD_Open()

If _AD_IsObjectLocked("timtest") Then
    ConsoleWrite("locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
Else
    ConsoleWrite("not locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
EndIf

_AD_Close()

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 post
Share on other sites

Could you try this and post the result?

#include <AD.au3>

_AD_Open()

If _AD_IsObjectLocked("timtest") Then
    ConsoleWrite("locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
Else
    ConsoleWrite("not locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
EndIf

_AD_Close()

 

 

>"C:ProgrammeAutoIt3SciTEAutoIt3WrapperAutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:AutoItislockedtest.au3" /UserParams    

+>13:06:31 Starting AutoIt3Wrapper v.2.2.0.0 SciTE v.3.4.1.0   Keyboard:00000407  OS:WIN_XP/Service Pack 3  CPU:X64 OS:X86    Environment(Language:0407)

+>         SciTEDir => C:ProgrammeAutoIt3SciTE

>Running AU3Check (3.3.10.2)  from:C:ProgrammeAutoIt3  input:C:AutoItislockedtest.au3

+>13:06:31 AU3Check ended.rc:0

>Running:(3.3.10.2):C:ProgrammeAutoIt3autoit3.exe "C:AutoItislockedtest.au3"    

--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop

not locked. @error = 0, @extened = 0

+>13:06:32 AutoIt3.exe ended.rc:0

+>13:06:32 AutoIt3Wrapper Finished.

>Exit code: 0    Time: 1.028

Link to post
Share on other sites

OK. So no error happened.

Another try to get better error information:

#include <AD.au3>
 _AD_Open()
 If _AD_IsObjectLockedEX("timtest") Then
     ConsoleWrite("locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
 Else     
ConsoleWrite("not locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
_AD_Close()
EndIf

Func _AD_IsObjectLockedEX($sObject = @UserName)

    If Not _AD_ObjectExists($sObject) Then Return SetError(1, 0, 0)
    Local $sProperty = "sAMAccountName"
    If StringMid($sObject, 3, 1) = "=" Then $sProperty = "distinguishedName"; FQDN provided
    $__oAD_Command.CommandText = "<LDAP://" & $sAD_HostServer & "/" & $sAD_DNSDomain & ">;(" & $sProperty & "=" & $sObject & ");ADsPath;subtree"
    Local $oRecordSet = $__oAD_Command.Execute ; Retrieve the ADsPath for the object
    Local $sLDAPEntry = $oRecordSet.fields(0).Value
    Local $oObject = __AD_ObjGet($sLDAPEntry) ; Retrieve the COM Object for the object
    Local $oLockoutTime = $oObject.LockoutTime
    ; Object is not locked out
    If Not IsObj($oLockoutTime) Then Return SetError(10, 0, 0)
    ; Calculate lockout time (UTC)
    Local $sLockoutTime = _DateAdd("s", Int(__AD_LargeInt2Double($oLockoutTime.LowPart, $oLockoutTime.HighPart) / (10000000)), "1601/01/01 00:00:00")
    ; Object is not locked out
    If $sLockoutTime = "1601/01/01 00:00:00" Then Return SetError(11, 0, 0)
    ; Get password info - Account Lockout Duration
    Local $aTemp = _AD_GetPasswordInfo($sObject)
    ; if lockout duration is 0 (= unlock manually by admin needed) then no calculation is necessary. Set @error to -1 (minutes till the account is unlocked)
    If $aTemp[5] = 0 Then Return SetError(-1, 0, 1)
    ; Calculate when the lockout will be reset
    Local $sResetLockoutTime = _DateAdd("n", $aTemp[5], $sLockoutTime)
    ; Compare to current date/time (UTC)
    Local $sNow = _Date_Time_GetSystemTime()
    $sNow = _Date_Time_SystemTimeToDateTimeStr($sNow, 1)
    If $sResetLockoutTime >= $sNow Then Return SetError(_DateDiff("n", $sNow, $sResetLockoutTime), 0, 1)
        Return SetError(12, 0, 0)

EndFunc   ;==>_AD_IsObjectLocked

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 post
Share on other sites

 

OK. So no error happened.

Another try to get better error information:

#include <AD.au3>
 _AD_Open()
 If _AD_IsObjectLockedEX("timtest") Then
     ConsoleWrite("locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
 Else     
ConsoleWrite("not locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
_AD_Close()
EndIf

Func _AD_IsObjectLockedEX($sObject = @UserName)

    If Not _AD_ObjectExists($sObject) Then Return SetError(1, 0, 0)
    Local $sProperty = "sAMAccountName"
    If StringMid($sObject, 3, 1) = "=" Then $sProperty = "distinguishedName"; FQDN provided
    $__oAD_Command.CommandText = "<LDAP://" & $sAD_HostServer & "/" & $sAD_DNSDomain & ">;(" & $sProperty & "=" & $sObject & ");ADsPath;subtree"
    Local $oRecordSet = $__oAD_Command.Execute ; Retrieve the ADsPath for the object
    Local $sLDAPEntry = $oRecordSet.fields(0).Value
    Local $oObject = __AD_ObjGet($sLDAPEntry) ; Retrieve the COM Object for the object
    Local $oLockoutTime = $oObject.LockoutTime
    ; Object is not locked out
    If Not IsObj($oLockoutTime) Then Return SetError(10, 0, 0)
    ; Calculate lockout time (UTC)
    Local $sLockoutTime = _DateAdd("s", Int(__AD_LargeInt2Double($oLockoutTime.LowPart, $oLockoutTime.HighPart) / (10000000)), "1601/01/01 00:00:00")
    ; Object is not locked out
    If $sLockoutTime = "1601/01/01 00:00:00" Then Return SetError(11, 0, 0)
    ; Get password info - Account Lockout Duration
    Local $aTemp = _AD_GetPasswordInfo($sObject)
    ; if lockout duration is 0 (= unlock manually by admin needed) then no calculation is necessary. Set @error to -1 (minutes till the account is unlocked)
    If $aTemp[5] = 0 Then Return SetError(-1, 0, 1)
    ; Calculate when the lockout will be reset
    Local $sResetLockoutTime = _DateAdd("n", $aTemp[5], $sLockoutTime)
    ; Compare to current date/time (UTC)
    Local $sNow = _Date_Time_GetSystemTime()
    $sNow = _Date_Time_SystemTimeToDateTimeStr($sNow, 1)
    If $sResetLockoutTime >= $sNow Then Return SetError(_DateDiff("n", $sNow, $sResetLockoutTime), 0, 1)
        Return SetError(12, 0, 0)

EndFunc   ;==>_AD_IsObjectLocked

 

Yes custimzed SORRY :)

now it works:

>Running AU3Check (3.3.10.2)  from:C:ProgrammeAutoIt3  input:C:AutoItislockedtest.au3

+>14:16:29 AU3Check ended.rc:0

>Running:(3.3.10.2):C:ProgrammeAutoIt3autoit3.exe "C:AutoItislockedtest.au3"    

--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop

not locked. @error = 12, @extened = 0

+>14:16:30 AutoIt3.exe ended.rc:0

+>14:16:30 AutoIt3Wrapper Finished.

>Exit code: 0    Time: 1.192

Edited by Tim33
Link to post
Share on other sites

I copied your code and it runs just fine here. I use AutoIt 3.3.1.0.2 as well.

Do you have a custimzed version of the AD UDF lying around somewhre?

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 post
Share on other sites

Water,

I outputted the _AD_ timings to a VAR and then dumped it results to a file. Please find the contents below. Also, I used _AD_Open only once.

The times for Windows 8:

09:10:30.444 - _AD_GetGroupMembers - Start
09:10:30.694 - _AD_GetGroupMembers - End
09:10:30.694 - _AD_GetObjectProperties For 115 Users.
09:10:30.694 - _AD_GetObjectProperties For User 1 - Start
09:10:42.913 - _AD_GetObjectProperties For User 1 - End
09:10:42.913 - _AD_GetObjectProperties For User 2 - Start
09:10:49.038 - _AD_GetObjectProperties For User 2 - End
09:10:49.038 - _AD_GetObjectProperties For User 3 - Start
09:11:01.304 - _AD_GetObjectProperties For User 3 - End
09:11:01.304 - _AD_GetObjectProperties For User 4 - Start
09:11:10.570 - _AD_GetObjectProperties For User 4 - End
09:11:10.570 - _AD_GetObjectProperties For User 5 - Start
09:11:18.461 - _AD_GetObjectProperties For User 5 - End
09:11:18.461 - _AD_GetObjectProperties For User 6 - Start
09:11:27.759 - _AD_GetObjectProperties For User 6 - End
09:11:27.759 - _AD_GetObjectProperties For User 7 - Start
09:11:41.431 - _AD_GetObjectProperties For User 7 - End
09:11:41.431 - _AD_GetObjectProperties For User 8 - Start
09:11:51.213 - _AD_GetObjectProperties For User 8 - End
09:11:51.213 - _AD_GetObjectProperties For User 9 - Start
09:12:00.026 - _AD_GetObjectProperties For User 9 - End
09:12:00.026 - _AD_GetObjectProperties For User 10 - Start
09:12:11.058 - _AD_GetObjectProperties For User 10 - End
09:12:11.058 - _AD_GetObjectProperties For User 11 - Start
09:12:20.730 - _AD_GetObjectProperties For User 11 - End
09:12:20.730 - _AD_GetObjectProperties For User 12 - Start
09:12:24.793 - _AD_GetObjectProperties For User 12 - End
09:12:24.793 - _AD_GetObjectProperties For User 13 - Start
09:12:35.278 - _AD_GetObjectProperties For User 13 - End
09:12:35.278 - _AD_GetObjectProperties For User 14 - Start
09:12:47.263 - _AD_GetObjectProperties For User 14 - End
09:12:47.263 - _AD_GetObjectProperties For User 15 - Start
09:12:59.795 - _AD_GetObjectProperties For User 15 - End
09:12:59.795 - _AD_GetObjectProperties For User 16 - Start
09:13:03.576 - _AD_GetObjectProperties For User 16 - End
09:13:03.576 - _AD_GetObjectProperties For User 17 - Start
09:13:16.389 - _AD_GetObjectProperties For User 17 - End
09:13:16.389 - _AD_GetObjectProperties For User 18 - Start
09:13:26.890 - _AD_GetObjectProperties For User 18 - End
09:13:26.890 - _AD_GetObjectProperties For User 19 - Start
09:13:37.749 - _AD_GetObjectProperties For User 19 - End
09:13:37.749 - _AD_GetObjectProperties For User 20 - Start
09:13:45.328 - _AD_GetObjectProperties For User 20 - End
09:13:45.328 - _AD_GetObjectProperties For User 21 - Start
09:13:56.735 - _AD_GetObjectProperties For User 21 - End
09:13:56.735 - _AD_GetObjectProperties For User 22 - Start
09:14:10.579 - _AD_GetObjectProperties For User 22 - End
09:14:10.579 - _AD_GetObjectProperties For User 23 - Start
09:14:21.595 - _AD_GetObjectProperties For User 23 - End
09:14:21.595 - _AD_GetObjectProperties For User 24 - Start
09:14:32.049 - _AD_GetObjectProperties For User 24 - End
09:14:32.049 - _AD_GetObjectProperties For User 25 - Start
09:14:43.112 - _AD_GetObjectProperties For User 25 - End
09:14:43.112 - _AD_GetObjectProperties For User 26 - Start
09:14:55.113 - _AD_GetObjectProperties For User 26 - End
09:14:55.113 - _AD_GetObjectProperties For User 27 - Start
09:15:06.066 - _AD_GetObjectProperties For User 27 - End
09:15:06.066 - _AD_GetObjectProperties For User 28 - Start
09:15:14.551 - _AD_GetObjectProperties For User 28 - End
09:15:14.551 - _AD_GetObjectProperties For User 29 - Start
09:15:22.911 - _AD_GetObjectProperties For User 29 - End
09:15:22.911 - _AD_GetObjectProperties For User 30 - Start
09:15:31.755 - _AD_GetObjectProperties For User 30 - End
09:15:31.755 - _AD_GetObjectProperties For User 31 - Start
09:15:41.287 - _AD_GetObjectProperties For User 31 - End
09:15:41.287 - _AD_GetObjectProperties For User 32 - Start
09:15:49.303 - _AD_GetObjectProperties For User 32 - End
09:15:49.303 - _AD_GetObjectProperties For User 33 - Start
09:15:59.506 - _AD_GetObjectProperties For User 33 - End
09:15:59.506 - _AD_GetObjectProperties For User 34 - Start
09:16:09.647 - _AD_GetObjectProperties For User 34 - End
09:16:09.647 - _AD_GetObjectProperties For User 35 - Start
09:16:20.085 - _AD_GetObjectProperties For User 35 - End
09:16:20.085 - _AD_GetObjectProperties For User 36 - Start
09:16:31.727 - _AD_GetObjectProperties For User 36 - End
09:16:31.727 - _AD_GetObjectProperties For User 37 - Start
09:16:41.899 - _AD_GetObjectProperties For User 37 - End
09:16:41.899 - _AD_GetObjectProperties For User 38 - Start
09:16:52.618 - _AD_GetObjectProperties For User 38 - End
09:16:52.618 - _AD_GetObjectProperties For User 39 - Start
09:17:05.775 - _AD_GetObjectProperties For User 39 - End
09:17:05.775 - _AD_GetObjectProperties For User 40 - Start
09:17:17.494 - _AD_GetObjectProperties For User 40 - End
09:17:17.494 - _AD_GetObjectProperties For User 41 - Start
09:17:26.511 - _AD_GetObjectProperties For User 41 - End
09:17:26.511 - _AD_GetObjectProperties For User 42 - Start
09:17:37.605 - _AD_GetObjectProperties For User 42 - End
09:17:37.605 - _AD_GetObjectProperties For User 43 - Start
09:17:51.262 - _AD_GetObjectProperties For User 43 - End
09:17:51.262 - _AD_GetObjectProperties For User 44 - Start
09:18:01.325 - _AD_GetObjectProperties For User 44 - End
09:18:01.325 - _AD_GetObjectProperties For User 45 - Start
09:18:11.935 - _AD_GetObjectProperties For User 45 - End
09:18:11.935 - _AD_GetObjectProperties For User 46 - Start
09:18:20.498 - _AD_GetObjectProperties For User 46 - End
09:18:20.498 - _AD_GetObjectProperties For User 47 - Start
09:18:30.107 - _AD_GetObjectProperties For User 47 - End
09:18:30.107 - _AD_GetObjectProperties For User 48 - Start
09:18:41.874 - _AD_GetObjectProperties For User 48 - End
09:18:41.874 - _AD_GetObjectProperties For User 49 - Start
09:18:53.905 - _AD_GetObjectProperties For User 49 - End
09:18:53.905 - _AD_GetObjectProperties For User 50 - Start
09:19:03.296 - _AD_GetObjectProperties For User 50 - End
09:19:03.296 - _AD_GetObjectProperties For User 51 - Start
09:19:14.203 - _AD_GetObjectProperties For User 51 - End
09:19:14.203 - _AD_GetObjectProperties For User 52 - Start
09:19:25.985 - _AD_GetObjectProperties For User 52 - End
09:19:25.985 - _AD_GetObjectProperties For User 53 - Start
09:19:40.517 - _AD_GetObjectProperties For User 53 - End
09:19:40.517 - _AD_GetObjectProperties For User 54 - Start
09:19:52.580 - _AD_GetObjectProperties For User 54 - End
09:19:52.580 - _AD_GetObjectProperties For User 55 - Start
09:20:01.956 - _AD_GetObjectProperties For User 55 - End
09:20:01.956 - _AD_GetObjectProperties For User 56 - Start
09:20:11.315 - _AD_GetObjectProperties For User 56 - End
09:20:11.315 - _AD_GetObjectProperties For User 57 - Start
09:20:21.378 - _AD_GetObjectProperties For User 57 - End
09:20:21.378 - _AD_GetObjectProperties For User 58 - Start
09:20:32.504 - _AD_GetObjectProperties For User 58 - End
09:20:32.504 - _AD_GetObjectProperties For User 59 - Start
09:20:43.692 - _AD_GetObjectProperties For User 59 - End
09:20:43.692 - _AD_GetObjectProperties For User 60 - Start
09:20:55.646 - _AD_GetObjectProperties For User 60 - End
09:20:55.646 - _AD_GetObjectProperties For User 61 - Start
09:21:09.178 - _AD_GetObjectProperties For User 61 - End
09:21:09.178 - _AD_GetObjectProperties For User 62 - Start
09:21:20.787 - _AD_GetObjectProperties For User 62 - End
09:21:20.787 - _AD_GetObjectProperties For User 63 - Start
09:21:32.241 - _AD_GetObjectProperties For User 63 - End
09:21:32.241 - _AD_GetObjectProperties For User 64 - Start
09:21:45.523 - _AD_GetObjectProperties For User 64 - End
09:21:45.523 - _AD_GetObjectProperties For User 65 - Start
09:21:57.524 - _AD_GetObjectProperties For User 65 - End
09:21:57.524 - _AD_GetObjectProperties For User 66 - Start
09:22:11.556 - _AD_GetObjectProperties For User 66 - End
09:22:11.556 - _AD_GetObjectProperties For User 67 - Start
09:22:23.228 - _AD_GetObjectProperties For User 67 - End
09:22:23.228 - _AD_GetObjectProperties For User 68 - Start
09:22:33.478 - _AD_GetObjectProperties For User 68 - End
09:22:33.478 - _AD_GetObjectProperties For User 69 - Start
09:22:47.010 - _AD_GetObjectProperties For User 69 - End
09:22:47.010 - _AD_GetObjectProperties For User 70 - Start
09:22:59.605 - _AD_GetObjectProperties For User 70 - End
09:22:59.605 - _AD_GetObjectProperties For User 71 - Start
09:23:13.340 - _AD_GetObjectProperties For User 71 - End
09:23:13.340 - _AD_GetObjectProperties For User 72 - Start
09:23:27.481 - _AD_GetObjectProperties For User 72 - End
09:23:27.481 - _AD_GetObjectProperties For User 73 - Start
09:23:39.435 - _AD_GetObjectProperties For User 73 - End
09:23:39.435 - _AD_GetObjectProperties For User 74 - Start
09:23:52.904 - _AD_GetObjectProperties For User 74 - End
09:23:52.904 - _AD_GetObjectProperties For User 75 - Start
09:24:03.936 - _AD_GetObjectProperties For User 75 - End
09:24:03.936 - _AD_GetObjectProperties For User 76 - Start
09:24:14.405 - _AD_GetObjectProperties For User 76 - End
09:24:14.405 - _AD_GetObjectProperties For User 77 - Start
09:24:25.250 - _AD_GetObjectProperties For User 77 - End
09:24:25.250 - _AD_GetObjectProperties For User 78 - Start
09:24:35.969 - _AD_GetObjectProperties For User 78 - End
09:24:35.969 - _AD_GetObjectProperties For User 79 - Start
09:24:47.985 - _AD_GetObjectProperties For User 79 - End
09:24:47.985 - _AD_GetObjectProperties For User 80 - Start
09:25:02.033 - _AD_GetObjectProperties For User 80 - End
09:25:02.033 - _AD_GetObjectProperties For User 81 - Start
09:25:13.767 - _AD_GetObjectProperties For User 81 - End
09:25:13.767 - _AD_GetObjectProperties For User 82 - Start
09:25:27.518 - _AD_GetObjectProperties For User 82 - End
09:25:27.518 - _AD_GetObjectProperties For User 83 - Start
09:25:38.972 - _AD_GetObjectProperties For User 83 - End
09:25:38.972 - _AD_GetObjectProperties For User 84 - Start
09:25:53.473 - _AD_GetObjectProperties For User 84 - End
09:25:53.473 - _AD_GetObjectProperties For User 85 - Start
09:26:08.114 - _AD_GetObjectProperties For User 85 - End
09:26:08.114 - _AD_GetObjectProperties For User 86 - Start
09:26:23.802 - _AD_GetObjectProperties For User 86 - End
09:26:23.802 - _AD_GetObjectProperties For User 87 - Start
09:26:36.037 - _AD_GetObjectProperties For User 87 - End
09:26:36.037 - _AD_GetObjectProperties For User 88 - Start
09:26:52.100 - _AD_GetObjectProperties For User 88 - End
09:26:52.100 - _AD_GetObjectProperties For User 89 - Start
09:27:04.257 - _AD_GetObjectProperties For User 89 - End
09:27:04.257 - _AD_GetObjectProperties For User 90 - Start
09:27:20.680 - _AD_GetObjectProperties For User 90 - End
09:27:20.680 - _AD_GetObjectProperties For User 91 - Start
09:27:36.806 - _AD_GetObjectProperties For User 91 - End
09:27:36.806 - _AD_GetObjectProperties For User 92 - Start
09:27:52.588 - _AD_GetObjectProperties For User 92 - End
09:27:52.588 - _AD_GetObjectProperties For User 93 - Start
09:28:08.432 - _AD_GetObjectProperties For User 93 - End
09:28:08.432 - _AD_GetObjectProperties For User 94 - Start
09:28:25.058 - _AD_GetObjectProperties For User 94 - End
09:28:25.058 - _AD_GetObjectProperties For User 95 - Start
09:28:41.699 - _AD_GetObjectProperties For User 95 - End
09:28:41.699 - _AD_GetObjectProperties For User 96 - Start
09:28:57.716 - _AD_GetObjectProperties For User 96 - End
09:28:57.716 - _AD_GetObjectProperties For User 97 - Start
09:29:15.045 - _AD_GetObjectProperties For User 97 - End
09:29:15.045 - _AD_GetObjectProperties For User 98 - Start
09:29:30.061 - _AD_GetObjectProperties For User 98 - End
09:29:30.061 - _AD_GetObjectProperties For User 99 - Start
09:29:45.812 - _AD_GetObjectProperties For User 99 - End
09:29:45.812 - _AD_GetObjectProperties For User 100 - Start
09:30:01.891 - _AD_GetObjectProperties For User 100 - End
09:30:01.891 - _AD_GetObjectProperties For User 101 - Start
09:30:17.813 - _AD_GetObjectProperties For User 101 - End
09:30:17.813 - _AD_GetObjectProperties For User 102 - Start
09:30:34.252 - _AD_GetObjectProperties For User 102 - End
09:30:34.252 - _AD_GetObjectProperties For User 103 - Start
09:30:50.049 - _AD_GetObjectProperties For User 103 - End
09:30:50.049 - _AD_GetObjectProperties For User 104 - Start
09:31:07.722 - _AD_GetObjectProperties For User 104 - End
09:31:07.722 - _AD_GetObjectProperties For User 105 - Start
09:31:23.676 - _AD_GetObjectProperties For User 105 - End
09:31:23.676 - _AD_GetObjectProperties For User 106 - Start
09:31:38.864 - _AD_GetObjectProperties For User 106 - End
09:31:38.864 - _AD_GetObjectProperties For User 107 - Start
09:31:54.849 - _AD_GetObjectProperties For User 107 - End
09:31:54.849 - _AD_GetObjectProperties For User 108 - Start
09:32:10.866 - _AD_GetObjectProperties For User 108 - End
09:32:10.866 - _AD_GetObjectProperties For User 109 - Start
09:32:26.929 - _AD_GetObjectProperties For User 109 - End
09:32:26.929 - _AD_GetObjectProperties For User 110 - Start
09:32:43.305 - _AD_GetObjectProperties For User 110 - End
09:32:43.305 - _AD_GetObjectProperties For User 111 - Start
09:32:59.056 - _AD_GetObjectProperties For User 111 - End
09:32:59.056 - _AD_GetObjectProperties For User 112 - Start
09:33:15.275 - _AD_GetObjectProperties For User 112 - End
09:33:15.275 - _AD_GetObjectProperties For User 113 - Start
09:33:31.557 - _AD_GetObjectProperties For User 113 - End
09:33:31.557 - _AD_GetObjectProperties For User 114 - Start
09:33:47.667 - _AD_GetObjectProperties For User 114 - End
09:33:47.667 - _AD_GetObjectProperties For User 115 - Start
09:34:03.887 - _AD_GetObjectProperties For User 115 - End

The same script times for Windows 7:

09:51:43.737 - _AD_GetGroupMembers - Start
09:51:44.017 - _AD_GetGroupMembers - End
09:51:44.017 - _AD_GetObjectProperties For 115 Users.
09:51:44.017 - _AD_GetObjectProperties For User 1 - Start
09:51:44.259 - _AD_GetObjectProperties For User 1 - End
09:51:44.259 - _AD_GetObjectProperties For User 2 - Start
09:51:44.357 - _AD_GetObjectProperties For User 2 - End
09:51:44.357 - _AD_GetObjectProperties For User 3 - Start
09:51:44.522 - _AD_GetObjectProperties For User 3 - End
09:51:44.522 - _AD_GetObjectProperties For User 4 - Start
09:51:44.690 - _AD_GetObjectProperties For User 4 - End
09:51:44.690 - _AD_GetObjectProperties For User 5 - Start
09:51:44.863 - _AD_GetObjectProperties For User 5 - End
09:51:44.863 - _AD_GetObjectProperties For User 6 - Start
09:51:45.038 - _AD_GetObjectProperties For User 6 - End
09:51:45.038 - _AD_GetObjectProperties For User 7 - Start
09:51:45.264 - _AD_GetObjectProperties For User 7 - End
09:51:45.264 - _AD_GetObjectProperties For User 8 - Start
09:51:45.438 - _AD_GetObjectProperties For User 8 - End
09:51:45.438 - _AD_GetObjectProperties For User 9 - Start
09:51:45.608 - _AD_GetObjectProperties For User 9 - End
09:51:45.609 - _AD_GetObjectProperties For User 10 - Start
09:51:45.783 - _AD_GetObjectProperties For User 10 - End
09:51:45.783 - _AD_GetObjectProperties For User 11 - Start
09:51:45.959 - _AD_GetObjectProperties For User 11 - End
09:51:45.959 - _AD_GetObjectProperties For User 12 - Start
09:51:46.057 - _AD_GetObjectProperties For User 12 - End
09:51:46.057 - _AD_GetObjectProperties For User 13 - Start
09:51:46.238 - _AD_GetObjectProperties For User 13 - End
09:51:46.238 - _AD_GetObjectProperties For User 14 - Start
09:51:46.444 - _AD_GetObjectProperties For User 14 - End
09:51:46.444 - _AD_GetObjectProperties For User 15 - Start
09:51:46.622 - _AD_GetObjectProperties For User 15 - End
09:51:46.622 - _AD_GetObjectProperties For User 16 - Start
09:51:46.768 - _AD_GetObjectProperties For User 16 - End
09:51:46.768 - _AD_GetObjectProperties For User 17 - Start
09:51:46.992 - _AD_GetObjectProperties For User 17 - End
09:51:46.992 - _AD_GetObjectProperties For User 18 - Start
09:51:47.172 - _AD_GetObjectProperties For User 18 - End
09:51:47.172 - _AD_GetObjectProperties For User 19 - Start
09:51:47.351 - _AD_GetObjectProperties For User 19 - End
09:51:47.351 - _AD_GetObjectProperties For User 20 - Start
09:51:47.527 - _AD_GetObjectProperties For User 20 - End
09:51:47.528 - _AD_GetObjectProperties For User 21 - Start
09:51:47.707 - _AD_GetObjectProperties For User 21 - End
09:51:47.707 - _AD_GetObjectProperties For User 22 - Start
09:51:47.886 - _AD_GetObjectProperties For User 22 - End
09:51:47.886 - _AD_GetObjectProperties For User 23 - Start
09:51:48.083 - _AD_GetObjectProperties For User 23 - End
09:51:48.083 - _AD_GetObjectProperties For User 24 - Start
09:51:48.258 - _AD_GetObjectProperties For User 24 - End
09:51:48.258 - _AD_GetObjectProperties For User 25 - Start
09:51:48.435 - _AD_GetObjectProperties For User 25 - End
09:51:48.435 - _AD_GetObjectProperties For User 26 - Start
09:51:48.614 - _AD_GetObjectProperties For User 26 - End
09:51:48.614 - _AD_GetObjectProperties For User 27 - Start
09:51:48.789 - _AD_GetObjectProperties For User 27 - End
09:51:48.789 - _AD_GetObjectProperties For User 28 - Start
09:51:48.973 - _AD_GetObjectProperties For User 28 - End
09:51:48.973 - _AD_GetObjectProperties For User 29 - Start
09:51:49.144 - _AD_GetObjectProperties For User 29 - End
09:51:49.144 - _AD_GetObjectProperties For User 30 - Start
09:51:49.319 - _AD_GetObjectProperties For User 30 - End
09:51:49.319 - _AD_GetObjectProperties For User 31 - Start
09:51:49.492 - _AD_GetObjectProperties For User 31 - End
09:51:49.492 - _AD_GetObjectProperties For User 32 - Start
09:51:49.665 - _AD_GetObjectProperties For User 32 - End
09:51:49.665 - _AD_GetObjectProperties For User 33 - Start
09:51:49.839 - _AD_GetObjectProperties For User 33 - End
09:51:49.839 - _AD_GetObjectProperties For User 34 - Start
09:51:50.007 - _AD_GetObjectProperties For User 34 - End
09:51:50.007 - _AD_GetObjectProperties For User 35 - Start
09:51:50.195 - _AD_GetObjectProperties For User 35 - End
09:51:50.195 - _AD_GetObjectProperties For User 36 - Start
09:51:50.371 - _AD_GetObjectProperties For User 36 - End
09:51:50.371 - _AD_GetObjectProperties For User 37 - Start
09:51:50.548 - _AD_GetObjectProperties For User 37 - End
09:51:50.548 - _AD_GetObjectProperties For User 38 - Start
09:51:50.725 - _AD_GetObjectProperties For User 38 - End
09:51:50.725 - _AD_GetObjectProperties For User 39 - Start
09:51:50.898 - _AD_GetObjectProperties For User 39 - End
09:51:50.898 - _AD_GetObjectProperties For User 40 - Start
09:51:51.073 - _AD_GetObjectProperties For User 40 - End
09:51:51.073 - _AD_GetObjectProperties For User 41 - Start
09:51:51.273 - _AD_GetObjectProperties For User 41 - End
09:51:51.273 - _AD_GetObjectProperties For User 42 - Start
09:51:51.471 - _AD_GetObjectProperties For User 42 - End
09:51:51.471 - _AD_GetObjectProperties For User 43 - Start
09:51:51.678 - _AD_GetObjectProperties For User 43 - End
09:51:51.678 - _AD_GetObjectProperties For User 44 - Start
09:51:51.865 - _AD_GetObjectProperties For User 44 - End
09:51:51.865 - _AD_GetObjectProperties For User 45 - Start
09:51:52.043 - _AD_GetObjectProperties For User 45 - End
09:51:52.043 - _AD_GetObjectProperties For User 46 - Start
09:51:52.256 - _AD_GetObjectProperties For User 46 - End
09:51:52.256 - _AD_GetObjectProperties For User 47 - Start
09:51:52.433 - _AD_GetObjectProperties For User 47 - End
09:51:52.433 - _AD_GetObjectProperties For User 48 - Start
09:51:52.614 - _AD_GetObjectProperties For User 48 - End
09:51:52.614 - _AD_GetObjectProperties For User 49 - Start
09:51:52.816 - _AD_GetObjectProperties For User 49 - End
09:51:52.816 - _AD_GetObjectProperties For User 50 - Start
09:51:52.995 - _AD_GetObjectProperties For User 50 - End
09:51:52.995 - _AD_GetObjectProperties For User 51 - Start
09:51:53.191 - _AD_GetObjectProperties For User 51 - End
09:51:53.191 - _AD_GetObjectProperties For User 52 - Start
09:51:53.382 - _AD_GetObjectProperties For User 52 - End
09:51:53.382 - _AD_GetObjectProperties For User 53 - Start
09:51:53.580 - _AD_GetObjectProperties For User 53 - End
09:51:53.580 - _AD_GetObjectProperties For User 54 - Start
09:51:53.777 - _AD_GetObjectProperties For User 54 - End
09:51:53.777 - _AD_GetObjectProperties For User 55 - Start
09:51:53.954 - _AD_GetObjectProperties For User 55 - End
09:51:53.954 - _AD_GetObjectProperties For User 56 - Start
09:51:54.160 - _AD_GetObjectProperties For User 56 - End
09:51:54.160 - _AD_GetObjectProperties For User 57 - Start
09:51:54.337 - _AD_GetObjectProperties For User 57 - End
09:51:54.338 - _AD_GetObjectProperties For User 58 - Start
09:51:54.531 - _AD_GetObjectProperties For User 58 - End
09:51:54.531 - _AD_GetObjectProperties For User 59 - Start
09:51:54.728 - _AD_GetObjectProperties For User 59 - End
09:51:54.728 - _AD_GetObjectProperties For User 60 - Start
09:51:54.924 - _AD_GetObjectProperties For User 60 - End
09:51:54.924 - _AD_GetObjectProperties For User 61 - Start
09:51:55.124 - _AD_GetObjectProperties For User 61 - End
09:51:55.124 - _AD_GetObjectProperties For User 62 - Start
09:51:55.321 - _AD_GetObjectProperties For User 62 - End
09:51:55.321 - _AD_GetObjectProperties For User 63 - Start
09:51:55.522 - _AD_GetObjectProperties For User 63 - End
09:51:55.522 - _AD_GetObjectProperties For User 64 - Start
09:51:55.714 - _AD_GetObjectProperties For User 64 - End
09:51:55.714 - _AD_GetObjectProperties For User 65 - Start
09:51:55.916 - _AD_GetObjectProperties For User 65 - End
09:51:55.916 - _AD_GetObjectProperties For User 66 - Start
09:51:56.120 - _AD_GetObjectProperties For User 66 - End
09:51:56.120 - _AD_GetObjectProperties For User 67 - Start
09:51:56.320 - _AD_GetObjectProperties For User 67 - End
09:51:56.320 - _AD_GetObjectProperties For User 68 - Start
09:51:56.518 - _AD_GetObjectProperties For User 68 - End
09:51:56.518 - _AD_GetObjectProperties For User 69 - Start
09:51:56.715 - _AD_GetObjectProperties For User 69 - End
09:51:56.715 - _AD_GetObjectProperties For User 70 - Start
09:51:56.913 - _AD_GetObjectProperties For User 70 - End
09:51:56.913 - _AD_GetObjectProperties For User 71 - Start
09:51:57.113 - _AD_GetObjectProperties For User 71 - End
09:51:57.113 - _AD_GetObjectProperties For User 72 - Start
09:51:57.313 - _AD_GetObjectProperties For User 72 - End
09:51:57.313 - _AD_GetObjectProperties For User 73 - Start
09:51:57.508 - _AD_GetObjectProperties For User 73 - End
09:51:57.508 - _AD_GetObjectProperties For User 74 - Start
09:51:57.711 - _AD_GetObjectProperties For User 74 - End
09:51:57.711 - _AD_GetObjectProperties For User 75 - Start
09:51:57.917 - _AD_GetObjectProperties For User 75 - End
09:51:57.917 - _AD_GetObjectProperties For User 76 - Start
09:51:58.133 - _AD_GetObjectProperties For User 76 - End
09:51:58.133 - _AD_GetObjectProperties For User 77 - Start
09:51:58.340 - _AD_GetObjectProperties For User 77 - End
09:51:58.340 - _AD_GetObjectProperties For User 78 - Start
09:51:58.542 - _AD_GetObjectProperties For User 78 - End
09:51:58.542 - _AD_GetObjectProperties For User 79 - Start
09:51:58.750 - _AD_GetObjectProperties For User 79 - End
09:51:58.750 - _AD_GetObjectProperties For User 80 - Start
09:51:58.970 - _AD_GetObjectProperties For User 80 - End
09:51:58.970 - _AD_GetObjectProperties For User 81 - Start
09:51:59.182 - _AD_GetObjectProperties For User 81 - End
09:51:59.182 - _AD_GetObjectProperties For User 82 - Start
09:51:59.383 - _AD_GetObjectProperties For User 82 - End
09:51:59.383 - _AD_GetObjectProperties For User 83 - Start
09:51:59.583 - _AD_GetObjectProperties For User 83 - End
09:51:59.583 - _AD_GetObjectProperties For User 84 - Start
09:51:59.789 - _AD_GetObjectProperties For User 84 - End
09:51:59.789 - _AD_GetObjectProperties For User 85 - Start
09:51:59.985 - _AD_GetObjectProperties For User 85 - End
09:51:59.985 - _AD_GetObjectProperties For User 86 - Start
09:52:00.194 - _AD_GetObjectProperties For User 86 - End
09:52:00.194 - _AD_GetObjectProperties For User 87 - Start
09:52:00.390 - _AD_GetObjectProperties For User 87 - End
09:52:00.390 - _AD_GetObjectProperties For User 88 - Start
09:52:00.595 - _AD_GetObjectProperties For User 88 - End
09:52:00.595 - _AD_GetObjectProperties For User 89 - Start
09:52:00.785 - _AD_GetObjectProperties For User 89 - End
09:52:00.785 - _AD_GetObjectProperties For User 90 - Start
09:52:00.976 - _AD_GetObjectProperties For User 90 - End
09:52:00.976 - _AD_GetObjectProperties For User 91 - Start
09:52:01.167 - _AD_GetObjectProperties For User 91 - End
09:52:01.167 - _AD_GetObjectProperties For User 92 - Start
09:52:01.359 - _AD_GetObjectProperties For User 92 - End
09:52:01.359 - _AD_GetObjectProperties For User 93 - Start
09:52:01.559 - _AD_GetObjectProperties For User 93 - End
09:52:01.559 - _AD_GetObjectProperties For User 94 - Start
09:52:01.759 - _AD_GetObjectProperties For User 94 - End
09:52:01.759 - _AD_GetObjectProperties For User 95 - Start
09:52:01.957 - _AD_GetObjectProperties For User 95 - End
09:52:01.957 - _AD_GetObjectProperties For User 96 - Start
09:52:02.158 - _AD_GetObjectProperties For User 96 - End
09:52:02.158 - _AD_GetObjectProperties For User 97 - Start
09:52:02.354 - _AD_GetObjectProperties For User 97 - End
09:52:02.354 - _AD_GetObjectProperties For User 98 - Start
09:52:02.561 - _AD_GetObjectProperties For User 98 - End
09:52:02.561 - _AD_GetObjectProperties For User 99 - Start
09:52:02.753 - _AD_GetObjectProperties For User 99 - End
09:52:02.753 - _AD_GetObjectProperties For User 100 - Start
09:52:02.959 - _AD_GetObjectProperties For User 100 - End
09:52:02.959 - _AD_GetObjectProperties For User 101 - Start
09:52:03.153 - _AD_GetObjectProperties For User 101 - End
09:52:03.153 - _AD_GetObjectProperties For User 102 - Start
09:52:03.362 - _AD_GetObjectProperties For User 102 - End
09:52:03.362 - _AD_GetObjectProperties For User 103 - Start
09:52:03.560 - _AD_GetObjectProperties For User 103 - End
09:52:03.560 - _AD_GetObjectProperties For User 104 - Start
09:52:03.770 - _AD_GetObjectProperties For User 104 - End
09:52:03.770 - _AD_GetObjectProperties For User 105 - Start
09:52:03.968 - _AD_GetObjectProperties For User 105 - End
09:52:03.968 - _AD_GetObjectProperties For User 106 - Start
09:52:04.193 - _AD_GetObjectProperties For User 106 - End
09:52:04.193 - _AD_GetObjectProperties For User 107 - Start
09:52:04.405 - _AD_GetObjectProperties For User 107 - End
09:52:04.405 - _AD_GetObjectProperties For User 108 - Start
09:52:04.620 - _AD_GetObjectProperties For User 108 - End
09:52:04.620 - _AD_GetObjectProperties For User 109 - Start
09:52:04.850 - _AD_GetObjectProperties For User 109 - End
09:52:04.850 - _AD_GetObjectProperties For User 110 - Start
09:52:05.060 - _AD_GetObjectProperties For User 110 - End
09:52:05.060 - _AD_GetObjectProperties For User 111 - Start
09:52:05.268 - _AD_GetObjectProperties For User 111 - End
09:52:05.268 - _AD_GetObjectProperties For User 112 - Start
09:52:05.472 - _AD_GetObjectProperties For User 112 - End
09:52:05.472 - _AD_GetObjectProperties For User 113 - Start
09:52:05.695 - _AD_GetObjectProperties For User 113 - End
09:52:05.695 - _AD_GetObjectProperties For User 114 - Start
09:52:05.892 - _AD_GetObjectProperties For User 114 - End
09:52:05.892 - _AD_GetObjectProperties For User 115 - Start
09:52:06.091 - _AD_GetObjectProperties For User 115 - End

Just for reference.

Link to post
Share on other sites

Wow, that's quite a big difference!

Do you access the same Domain Controller with Windows 7 and Windows 8?

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 post
Share on other sites

Yes, our master DC which is in this building. Both machines are on the same subnet and everything. It is strange. I am new to PowerShell, so I took the same process and converted the _AD_GetObjectProperties to a PowerShell command, that process takes about 5 minutes in Windows 7 and about 12 minutes in Windows 8.

Link to post
Share on other sites

So it looks like the problem isn't caused by the AD UDF. I haven't used WIndows 8 so unfortunately I know nothing about it.

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 post
Share on other sites

 

OK. So no error happened.

Another try to get better error information:

#include <AD.au3>
 _AD_Open()
 If _AD_IsObjectLockedEX("timtest") Then
     ConsoleWrite("locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
 Else     
ConsoleWrite("not locked. @error = " & @error & ", @extened = " & @extended & @CRLF)
_AD_Close()
EndIf

Func _AD_IsObjectLockedEX($sObject = @UserName)

    If Not _AD_ObjectExists($sObject) Then Return SetError(1, 0, 0)
    Local $sProperty = "sAMAccountName"
    If StringMid($sObject, 3, 1) = "=" Then $sProperty = "distinguishedName"; FQDN provided
    $__oAD_Command.CommandText = "<LDAP://" & $sAD_HostServer & "/" & $sAD_DNSDomain & ">;(" & $sProperty & "=" & $sObject & ");ADsPath;subtree"
    Local $oRecordSet = $__oAD_Command.Execute ; Retrieve the ADsPath for the object
    Local $sLDAPEntry = $oRecordSet.fields(0).Value
    Local $oObject = __AD_ObjGet($sLDAPEntry) ; Retrieve the COM Object for the object
    Local $oLockoutTime = $oObject.LockoutTime
    ; Object is not locked out
    If Not IsObj($oLockoutTime) Then Return SetError(10, 0, 0)
    ; Calculate lockout time (UTC)
    Local $sLockoutTime = _DateAdd("s", Int(__AD_LargeInt2Double($oLockoutTime.LowPart, $oLockoutTime.HighPart) / (10000000)), "1601/01/01 00:00:00")
    ; Object is not locked out
    If $sLockoutTime = "1601/01/01 00:00:00" Then Return SetError(11, 0, 0)
    ; Get password info - Account Lockout Duration
    Local $aTemp = _AD_GetPasswordInfo($sObject)
    ; if lockout duration is 0 (= unlock manually by admin needed) then no calculation is necessary. Set @error to -1 (minutes till the account is unlocked)
    If $aTemp[5] = 0 Then Return SetError(-1, 0, 1)
    ; Calculate when the lockout will be reset
    Local $sResetLockoutTime = _DateAdd("n", $aTemp[5], $sLockoutTime)
    ; Compare to current date/time (UTC)
    Local $sNow = _Date_Time_GetSystemTime()
    $sNow = _Date_Time_SystemTimeToDateTimeStr($sNow, 1)
    If $sResetLockoutTime >= $sNow Then Return SetError(_DateDiff("n", $sNow, $sResetLockoutTime), 0, 1)
        Return SetError(12, 0, 0)

EndFunc   ;==>_AD_IsObjectLocked

 

>Running AU3Check (3.3.10.2)  from:C:ProgrammeAutoIt3  input:C:AutoItislockedtest.au3

+>14:16:29 AU3Check ended.rc:0

>Running:(3.3.10.2):C:ProgrammeAutoIt3autoit3.exe "C:AutoItislockedtest.au3"    

--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop

not locked. @error = 12, @extened = 0

+>14:16:30 AutoIt3.exe ended.rc:0

+>14:16:30 AutoIt3Wrapper Finished.

>Exit code: 0    Time: 1.192

Link to post
Share on other sites

If you run _AD_GetObjectProperties for the user, what's the value of property "lockouttime"?

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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By kurtykurtyboy
      GuiFlatButton is a UDF to easily create regular buttons with different colors for background, foreground, border, hover, focus, etc..
      This started as an effort to change the background color of a button and eventually grew into a full UDF.
      If you've looked around forums for changing button background colors, you have probably noticed that each proposed workaround has its own set of issues/side-effects. The answers usually circle back to 'use ownerdrawn buttons' and 'not worth it'. Well, now it is possible for anyone to easily create ownerdrawn buttons - totally worth it!
      Some issues with other workarounds such as drawing with GDI+ or using a colored label as a 'button':
      Not 'real' buttons so you lose built-in functionality that windows gives to buttons Messy / inefficient code in the main while loop to check for mouse position Slow to respond to click, paint, etc... Having to deal with GUIRegisterMsg messages Not straight-forward to implement GuiFlatButton is not a workaround; it is a technique to respond to Windows' built-in owner-drawn button events.
      With minimal effort, we can now create true simple colored buttons.
      The idea is to create an owner-drawn button using GUICtrlCreateButton then subclass the GUI and controls to handle the button-specific events to paint it however we want.
      This UDF magically does all of this for us! No need to worry about event handling or main while loop logic.
       
      How to use
      It couldn't be any easier! Simply create a new button using the familiar syntax. This creates an ownerdrawn button with default colors.
      $mybutton1 = GuiFlatButton_Create("Button 1", 78, 20, 120, 40) If you want to change the background and text colors:
      GuiFlatButton_SetBkColor(-1, 0x5555FF) GuiFlatButton_SetColor(-1, 0xFFFFFF) Advanced Usage
      Set background/text/border all at once
      GuiFlatButton_SetColors(-1, 0x0000FF, 0xFFFFFF, 0x9999FF) Set ALL colors for ALL button states! (normal, focus, hover, selected)
      Local $aColorsEx = [0x0000FF, 0xFFFFFF, -2, 0x4444FF, 0xFFFFFF, 0xAAAAFF, 0x6666FF, 0xFFFFFF, 0xCCCCFF, 0x0000EE, 0xFFFFFF, 0x7777EE] GuiFlatButton_SetColorsEx(-1, $aColorsEx) Set default colors to apply to any future buttons
      ;set colors GuiFlatButton_SetDefaultColors(0x0000FF, 0xFFFFFF, 0x9999FF) ;create buttons $mybutton1 = GuiFlatButton_Create("Button 1", 12, 20, 120, 40) $mybutton2 = GuiFlatButton_Create("Button 2", 143, 20, 120, 40) Set ALL color defaults
      ;set colors Local $aColorsEx = [0x0000FF, 0xFFFFFF, -2, 0x4444FF, 0xFFFFFF, 0xAAAAFF, 0x6666FF, 0xFFFFFF, 0xCCCCFF, 0x0000EE, 0xFFFFFF, 0x7777EE] GuiFlatButton_SetDefaultColorsEx($aColorsEx) ;create buttons $mybutton1 = GuiFlatButton_Create("Button 1", 12, 20, 120, 40) $mybutton2 = GuiFlatButton_Create("Button 2", 143, 20, 120, 40)  
      Available Functions
       
      Simple Example

      #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include "GuiFlatButton.au3" Example() ;GUI with one button Func Example() Local $hGUI, $mybutton1 $hGUI = GUICreate("GuiFlatButton Ex0", 275, 120) GUISetBkColor(0x333333) Local $idLabel = GUICtrlCreateLabel("Click the button", 10, 100, 150, 30) GUICtrlSetColor(-1, 0xFFFFFF) ;create new button then set the background and foreground colors $mybutton1 = GuiFlatButton_Create("Button 1" & @CRLF & "Line 2", 78, 20, 120, 40, $BS_MULTILINE) GuiFlatButton_SetBkColor(-1, 0x5555FF) GuiFlatButton_SetColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW, $hGUI) Local $i = 0 Local $iMsg While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop Case $mybutton1 $i += 1 GUICtrlSetData($idLabel, $i) ConsoleWrite($i & @CRLF) EndSwitch Sleep(10) WEnd GUIDelete() EndFunc ;==>Example
      Menu/Toolbar Example

      #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include "GuiFlatButton.au3" Example() ;Example GUI with toolbar Func Example() Local $hGUI, $idLabel, $aButtons, $iTbSize $hGUI = GUICreate("GuiFlatButton Ex2", 300, 200) GUISetBkColor(0x444444) $idLabel = GUICtrlCreateLabel("Click a button", 10, 180, 150, 30) GUICtrlSetColor(-1, 0xFFFFFF) $aButtons = createToolbar() $iTbSize = UBound($aButtons) GUISetState(@SW_SHOW, $hGUI) Local $i = 0 Local $iMsg While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop Case $aButtons[0] To $aButtons[$iTbSize - 1] ConsoleWrite("1") GUICtrlSetData($idLabel, GuiFlatButton_Read($iMsg)) EndSwitch Sleep(10) WEnd GUIDelete() EndFunc ;==>Example Func createToolbar() Local $aButtons[6] Local $bkColor = 0x777777 Local $textColor = 0xFFFFFF Local $borderColor = 0x999999 Local $aBtnClrs[12] = [0x777777, 0xFFFFFF, $GUI_BKCOLOR_TRANSPARENT, 0x888888, 0xFFFFFF, $GUI_BKCOLOR_TRANSPARENT, 0x999999, 0xFFFFFF, $GUI_BKCOLOR_TRANSPARENT, 0x666666, 0xFFFFFF, $GUI_BKCOLOR_TRANSPARENT] For $i = 0 To UBound($aButtons) - 1 $aButtons[$i] = GuiFlatButton_Create("B" & $i, $i * 50, 0, 50, 17) GuiFlatButton_SetColorsEx($aButtons[$i], $aBtnClrs) Next Return $aButtons EndFunc ;==>createToolbar  
      Icon Example
      You can even easily add icons to your buttons -- just create a new button and send it an icon!

      #include <GDIPlus.au3> #include "GuiFlatButton.au3" Example() ;buttons with Icon images Func Example() ;get images for demonstration _GDIPlus_Startup() ;initialize GDI+ Local $hIcon = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 258, 24, 24) ;extract the 'Save' icon Local $hBitmap = _GDIPlus_BitmapCreateFromHICON($hIcon) ;Create Bitmap from Icon (for demonstration) Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) ;Create HBitmap from Bitmap _GDIPlus_BitmapDispose($hBitmap) ;dispose the bitmap _GDIPlus_Shutdown() ;done with GDI+ Local $hGUI = GUICreate("GuiFlatButton Ex5", 255, 400) GUISetBkColor(0xEEEEEE) ;set default colors of future buttons Local $aColorsEx = _ [0xE2E5E8, 0X000000, 0x888888, _ ; normal : Background, Text, Border 0xE2E5E8, 0X000000, 0x333333, _ ; focus : Background, Text, Border 0xE8E8E8, 0X000000, 0x666666, _ ; hover : Background, Text, Border 0xDDDDDD, 0X000000, 0xAAAAAA] ; selected : Background, Text, Border GuiFlatButton_SetDefaultColorsEx($aColorsEx) ;normal button with icon $label1 = GUICtrlCreateLabel( "$BS_TOOLBUTTON -->", 5, 10) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) Local $mybutton1 = GuiFlatButton_Create("Save", 130, 5, 50, 48, $BS_TOOLBUTTON) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybutton1), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align top Local $mybuttonT = GuiFlatButton_Create("Top", 5, 65, 120, 55, $BS_TOP) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonT), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align top-left Local $mybuttonTL = GuiFlatButton_Create("Top-Left", 5, 125, 120, 55, BITOR($BS_TOP, $BS_LEFT)) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonTL), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align top-right Local $mybuttonTR = GuiFlatButton_Create("Top-Right", 5, 185, 120, 55, BITOR($BS_TOP, $BS_RIGHT)) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonTR), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align left Local $mybuttonL = GuiFlatButton_Create("Left", 5, 245, 120, 55, $BS_LEFT) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonL), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align bottom Local $mybuttonB = GuiFlatButton_Create("Bottom", 130, 65, 120, 55, $BS_BOTTOM) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonB), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align bottom-left Local $mybuttonBL = GuiFlatButton_Create("Bottom-Left", 130, 125, 120, 55, BITOR($BS_BOTTOM, $BS_LEFT)) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonBL), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align bottom-right Local $mybuttonBR = GuiFlatButton_Create("Bottom-Right", 130, 185, 120, 55, BITOR($BS_BOTTOM, $BS_RIGHT)) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonBR), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) ;align right Local $mybuttonR = GuiFlatButton_Create("Right", 130, 245, 120, 55, $BS_RIGHT) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonR), $BM_SETIMAGE, $IMAGE_ICON, $hIcon)) GuiFlatButton_SetState($mybuttonR, $GUI_DISABLE ) ;disabled Local $mybuttonDisable = GuiFlatButton_Create("Disabled", 130, 310, 120, 55, $BS_TOOLBUTTON) _WinAPI_DeleteObject(_SendMessage(GUICtrlGetHandle($mybuttonDisable), $BM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap)) GuiFlatButton_SetState($mybuttonDisable, $GUI_DISABLE ) ;clean up! _WinAPI_DestroyIcon( $hIcon ) _WinAPI_DeleteObject( $hHBitmap ) GUISetState(@SW_SHOW, $hGUI) Local $iMsg While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch Sleep(10) WEnd GUIDelete() EndFunc ;==>Example  
      I'm sure there are some use-cases I've forgotten, so feedback is welcome!
       
      Download the latest UDF and several more examples:
      GuiFlatButton_20220919.zip (1,121)
      Update 2022-09-19
      Added update from 05/25 back in after it was accidentally removed
      Update 2022-09-01
      Added $BS_MULTILINE button style
      Added ellipses when text is longer than the button
      Fixed compatibility with Opt("MustDeclareVars", 1)
      Update 2022-05-25
      Fixed issue, buttons disappear when a GUI containing a child window with WS_EX_MDICHILD extended style is moved
      Update 2022-05-24
      Fixed issue releasing subclassing when GUI is deleted but program is not closed
      Fixed occasional white background flicker
      Added function GuiFlatButton_GetPos
      Update 2021-01-02
      Fixed bug, not drawing correctly after deleting GUI with GUIDelete()
      Fixed bug, changing default colors changed all buttons, even previously created buttons
      Made some internal functions more efficient
      Update 2019-04-14
      Fixed bug, not showing pressed down state when clicking rapidly
      Added Icon/Bitmap support!
      Added function GuiFlatButton_SetPos to change the position and/or size of a button
      Update 2019-02-09
      Added 2 new functions to set the button colors globally for all future buttons.
      GuiFlatButton_SetDefaultColors 
      GuiFlatButton_SetDefaultColorsEx

      Credits to:
      Melba23 (UDF template)
      LarsJ (general subclassing code)
      4ggr35510n (TrackMouseEvent example)
      binhnx (disable dragging with $WS_EX_CONTROLPARENT)
      GUIRegisterMsg in AutoIt Help (owner-draw button example)
      funkey (_WinAPI_DrawState example)
       
       
       
       
    • By t0nZ
      Always searching for the "final" solution to my zipping/unzipping needs, I started years ago using WinRar with AutoIT (don't ask me why...) and for the last 10 years I worked well with the _zip.UDF , a good solution using the embedded windows zipfldr.dll.
      But often I work with a lot of data (both multi gigabytes and/or 100K+ files) and I noticed the performance of the windows zip DLL are not so good, the problem is maybe worsened by the mono thread operation using AutoIT +  zipfldr.dll.
      SO my choice is 7zip (7ZA.exe)  also for licence (freeware also for business) reasons, and I wrote a small and simple UDF:
      ; #INDEX# ======================================================================================================================= ; Title .........: _7za ; AutoIt Version : 3.3.16.0 ; Language ......: English ; Description ...: Functions for using 7za.exe archive manipulation app ; Author(s) .....: NSC ; Version .......: 1.2 ; Date ..........: 2022/06/28 ; =============================================================================================================================== ; ------------------------------------------------------------------------------ ; This software is provided 'as-is', without any express or ; implied warranty. In no event will the authors be held liable for any ; damages arising from the use of this software. ; #INCLUDES# =================================================================================================================== ; #include-once #include <AutoItConstants.au3> ; =============================================================================================================================== ; #VARIABLES# =================================================================================================================== ; Global Global $7za_exe = @ScriptDir & "\" & "7za.exe" ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ; _EXEC7za ;_UNcompress_7za ;_COMpress_7za_7z ;_COMpress_7za_zip ; =============================================================================================================================== ; #FUNCTION# ==================================================================================================================== ; Name ..........: _EXEC7za ; Description ...: launch 7Za.exe with params and returns exit codes ; Syntax ........: EXEC7za($7zCommands, $archive, $folder[, $show]) ; Parameters ....: $7zCommands - 7zip command line params ; $archive - complete path to the archive ; $folder - the source/destination folder ; $show - optional set the state of 7za console visibility, default @SW_HIDE, ; other values as ShellExecuteWait() ; Return values .: 1 - Success ; 0 - and set @error = 1 ; and ; @extended = 1 (Warning (Non fatal error(s)) ; @extended = 2 (Fatal error) ; @extended = 7 (Command line error) ; @extended = 8 (Not enough memory for operation) ; @extended = 255 (User stopped the process) ; @extended values set by 7za.exe exit codes ; Author ........: NSC ; Modified ......: 2022/05/13 ; Remarks .......: requires 7za.exe in @scriptdir, 7za.exe (7-Zip Extra: standalone console version) ; Thanks to 7-zip.org ; Related .......: ; Link ..........: ; Examples .......: compress a folder recursive with subfolders ; EXEC7za("u -mx4 -bt", c:\folder1\archive.7z", c:\folder1\folderTOcompress\ ) ; uncompress the same folder recursive ; EXEC7za("x -aoa -bt -r", "c:\folder1\archive.7z", "-oc:\folder2\") ; =============================================================================================================================== Func _EXEC_7za($7zCommands, $archive, $folder, $show = @SW_HIDE) Local $return7za = ShellExecuteWait($7za_exe, $7zCommands & ' "' & $archive & '" "' & $folder & '"', '', $SHEX_OPEN, $show) Select Case $return7za = 0 Return 1 Case Else Return SetError(1, $return7za, 0) EndSelect EndFunc ;==>_EXEC_7za ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UNcompress_7za ; Description ...: launch 7Za.exe with preset params to uncompress an archive (.7z or .zip recursively) and returns exit codes ; Syntax ........: _UNcompress_7za($archive, $folder[, $show]) ; Parameters ....: $archive - complete path to the archive ; $folder - the source/destination folder ; $show - optional set the state of 7za console visibility, default @SW_HIDE, ; other values as ShellExecuteWait() ; Return values .: 1 - Success ; 0 - and set @error = 1 ; and ; @extended = 1 (Warning (Non fatal error(s)) ; @extended = 2 (Fatal error) ; @extended = 7 (Command line error) ; @extended = 8 (Not enough memory for operation) ; @extended = 255 (User stopped the process) ; @extended values set by 7za.exe exit codes ; Author ........: NSC ; Modified ......: 2022/05/19 ; Remarks .......: requires 7za.exe in @scriptdir, 7za.exe (7-Zip Extra: standalone console version) ; Thanks to 7-zip.org ; Related .......: ; Link ..........: ; =============================================================================================================================== Func _UNcompress_7za($archive, $folder, $show = @SW_HIDE) Local $return7za = ShellExecuteWait($7za_exe, "x -aoa -bt -r" & ' "' & $archive & '" -o"' & $folder & '"', '', $SHEX_OPEN, $show) Select Case $return7za = 0 Return 1 Case Else Return SetError(1, $return7za, 0) EndSelect EndFunc ;==>_UNcompress_Folder_7za ; #FUNCTION# ==================================================================================================================== ; Name ..........: _COMpress_7za_7z ; Description ...: launch 7Za.exe with precompiled params to compress in .7z format ;a single file, a filtered (*.pdf) bunch of files or a folder (recursively) and returns exit codes ; Syntax ........: _COMpress_7za_7z($archive, $folder[, $show [, $compLvl]] ) ; Parameters ....: $archive - complete path to the archive ; $folder - the source file(s) / folder ; $show - optional set the state of 7za console visibility, default @SW_HIDE, ; other values as ShellExecuteWait() ; $CompLvl - optional compression level (1-9) default 4 ; Return values .: 1 - Success ; 0 - and set @error = 1 ; and ; @extended = 1 (Warning (Non fatal error(s)) ; @extended = 2 (Fatal error) ; @extended = 7 (Command line error) ; @extended = 8 (Not enough memory for operation) ; @extended = 255 (User stopped the process) ; @extended values set by 7za.exe exit codes ; Author ........: NSC ; Modified ......: 2022/06/22 ; Remarks .......: requires 7za.exe in @scriptdir, 7za.exe (7-Zip Extra: standalone console version) ; avoids re-compress of popular archives. ; Thanks to 7-zip.org ; Related .......: ; Link ..........: ; =============================================================================================================================== Func _COMpress_7za_7z($archive, $folder, $show = @SW_HIDE, $CompLvl = 4) If StringRight($folder, 4) = ".zip" Or StringRight($folder, 3) = ".7z" Or StringRight($folder, 4) = ".rar" Or StringRight($folder, 4) = ".lha" Or StringRight($folder, 3) = ".gz" Or StringRight($folder, 7) = ".tar.gz" Or StringRight($folder, 4) = ".iso" Then $CompLvl = 0 EndIf Local $return7za = ShellExecuteWait($7za_exe, 'u -mx' & $CompLvl & ' -mmt -bt' & ' "' & $archive & '" "' & $folder & '"', '', $SHEX_OPEN, $show) Select Case $return7za = 0 Return 1 Case Else Return SetError(1, $return7za, 0) EndSelect EndFunc ;==>_COMpress_7za_7z ; #FUNCTION# ==================================================================================================================== ; Name ..........: _COMpress_7za_zip ; Description ...: launch 7Za.exe with precompiled params to compress in zip format ; a single file, a filtered (*.pdf) bunch of files or a folder (recursively) and returns exit codes ; Syntax ........: _COMpress_7za_zip($archive, $folder[, $show [, $compLvl]] ) ; Parameters ....: $archive - complete path to the archive ; $folder - the source file(s) / folder ; $show - optional set the state of 7za console visibility, default @SW_HIDE, ; other values as ShellExecuteWait() ; $CompLvl - optional compression level (1-9) default 4 ; Return values .: 1 - Success ; 0 - and set @error = 1 ; and ; @extended = 1 (Warning (Non fatal error(s)) ; @extended = 2 (Fatal error) ; @extended = 7 (Command line error) ; @extended = 8 (Not enough memory for operation) ; @extended = 255 (User stopped the process) ; @extended values set by 7za.exe exit codes ; Author ........: NSC ; Modified ......: 2022/06/22 ; Remarks .......: requires 7za.exe in @scriptdir, 7za.exe (7-Zip Extra: standalone console version), ; avoids re-compress of popular archives. ; Thanks to 7-zip.org ; Related .......: ; Link ..........: ; =============================================================================================================================== Func _COMpress_7za_zip($archive, $folder, $show = @SW_HIDE, $CompLvl = 9) If StringRight($folder, 4) = ".zip" Or StringRight($folder, 3) = ".7z" Or StringRight($folder, 4) = ".rar" Or StringRight($folder, 4) = ".lha" Or StringRight($folder, 3) = ".gz" Or StringRight($folder, 7) = ".tar.gz" Or StringRight($folder, 4) = ".iso" Then $CompLvl = 0 EndIf Local $return7za = ShellExecuteWait($7za_exe, 'u -tzip -mx' & $CompLvl & ' -mmt -bt' & ' "' & $archive & '" "' & $folder & '"', '', $SHEX_OPEN, $show) Select Case $return7za = 0 Return 1 Case Else Return SetError(1, $return7za, 0) EndSelect EndFunc ;==>_COMpress_7za_zip You have to provide 7za.exe, in scriptdir in some way, maybe with a fileinstall or embedding in some way. 
      Daily I use most of the time:
      _UNcompress_7za
      _COMpress_7za_7z
      so I'am almost done with these funcs....
      Also I made a quick and dirty benchmark on some real world data (for me at least) , comparing the windows DLL, the zip ULTRA by 7zip and the various 7zip levels.

      My choice is level 4 (time/size) but your mileage may vary...
      Also, extracting many thousands of little files from a 7z archive with 7zip is waaaay fast in respect to other solutions.
    • By Kanashius
      This UDF can be used to draw at the Desktop Wallpaper (Windows 8+) with GDI+ without using files.
      The example runs with 60-120fps at my machine, so the speed is acceptable.
      When the script exits, the original wallpaper is restored.
      Have fun :).
      PS: The UDF uses the window between the background and the icons, so it could be used to add an own child window at the desktop. Just look at the begin of __Wallpaper_Startup ($hWorkerW).
       
      Example:
       
      WallpaperUDF.au3 WallpaperUDF Example.au3
    • By sandgre
      Wondering if you can help a teacher out.  For the last few years of remote, hybrid, and in-person teaching I've been using an AutoHotKey script that creates an inking toolbar to be used during a PowerPoint presentation.  (https://www.autohotkey.com/boards/viewtopic.php?t=79163) The annotation tools available through Ppt are woefully inadequate, and, on my machine at least, jump around all over the place - sometimes on the bottom, sometimes on the left, sometimes on the right.  It's a scavenger hunt every single time.  The inking tool is always available, and recent updates allowed for the addition of lots more colors, which I used for modeling phenomena with students. One tragic day I arrived to school to find that my district IT dep't took away access to AutoHotKey.  No more tool bar. 
      I've been trying to resurrect some programming skills from a past life. I'm working through various tutorials and help files, with the goal of recreating the toolbar in AutoIt.  I'm really needing some help to move things along though.  I've been going through your PowerPoint UDF and all of your functions seem to just relate to editing the slides. Can you point me in the direction of how to create a toolbar that accesses the annotation tools that are available during the slideshow itself? 
       
    • By Hermes
      Hi, I am struggling in setting the value of a textarea based on the value of clipboard (that contains a long web page source codes). If I use _WD_SetElementValue, it freezes after some time, or appears to be pressing tab and goes out of focus. I can also use send keys but i need the script to run in the background.
      Here is the full script:
      #Include "Chrome.au3" #Include "wd_core.au3" #Include "wd_helper.au3" #Include "WinHttp.au3" #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #include <Array.au3> #include <AutoItConstants.au3> #include <WinAPIFiles.au3> #include <GDIPlus.au3> #include <Excel.au3> Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_LoadWait($sSession) _WD_Navigate($sSession, "http://demo.borland.com/testsite/stadyn_largepagewithimages.html") _WD_LoadWait($sSession) Global $sSource = _WD_GetSource($sSession) Local $Paste = ClipPut($sSource) Local $sData = ClipGet() Local $aArray = 0, _ $iOffset = 1 While 1 $aArray = StringRegExp($sData, '(?s)<p>.*</p>', $STR_REGEXPARRAYMATCH, $iOffset) If @error Then ExitLoop $iOffset = @extended For $i = 0 To UBound($aArray) - 1 Local $Paste = ClipPut($aArray[$i]) Local $sRegExData = ClipGet() ;MsgBox(0, "", "$sRegExData = " & $sRegExData) Next WEnd _WD_Navigate($sSession, "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_textarea_placeholder") _WD_WaitElement($sSession, $_WD_LOCATOR_ByCSSSelector, "iframe#iframeResult") Local $sElement1 = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "iframe#iframeResult") _WD_FrameEnter($sSession, $sElement1) _WD_WaitElement($sSession, $_WD_LOCATOR_ByXPath, "//html/body/textarea") $textarea = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//html/body/textarea") _WD_ElementAction($sSession, $textarea, 'click') ;WD SetElementValue(SsSession, Stextarea, $sRegExData) <-- I can do this but the focus goes out, or the browser freezes _WD_FrameLeave($sSession) sleep(2000) Send("^v") _WD_LoadWait($sSession) _WD_Shutdown() Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "args":["start-maximized","disable-infobars"]}}}}' EndFunc ;==>SetupChrome Can someone help me please, or re-direct me to the right path? TIA!
×
×
  • Create New...