Jump to content

Turkey77

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Location
    Carlisle, PA - USA
  • Interests
    Hunting, Fishing, 4 wheeling, scripting! and my Family!!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Turkey77's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. That did it! Thanks Water!!! [0]<12< [1]<Maximum Password Age (days)<180 [2]<Minimum Password Age (days)<-0 [3]<Enforce Password History (# of passwords remembered)<4 [4]<Minimum Password Length<7 [5]<Account Lockout Duration (minutes)<99999 [6]<Account Lockout Threshold (invalid logon attempts)<6 [7]<Reset account lockout counter after (minutes)<99999 [8]<Password last changed (YYYY/MM/DD HH:MM:SS local time)<2012/01/25 13:15:06 [9]<Password expires (YYYY/MM/DD HH:MM:SS local time)< [10]<Password last changed (YYYY/MM/DD HH:MM:SS UTC)<2012/01/25 18:15:06 [11]<Password expires (YYYY/MM/DD HH:MM:SS UTC)< [12]<Password properties<0
  2. Note: I had changed my password prior to beginning our thread, it was just 5 years ago. I added the consolewrite and received this with my userid - 1166770896-30202752. However, I still don't receive this value converted to a date when my password is set to "not expire". Does the "negative zero" in minimum password age have anything to do with this? I also created a new account and as you suggested, received "1601/01/01 00:00".
  3. Water - OK, I just changed my password and still did not received pwdlastchanged value. So, I unchecked the box for "Password never expires" on my account and then ran. That did the trick. Bug? Please let me know if you need any further testing done. THANKS!! [0]<12< [1]<Maximum Password Age (days)<180 [2]<Minimum Password Age (days)<-0 [3]<Enforce Password History (# of passwords remembered)<4 [4]<Minimum Password Length<7 [5]<Account Lockout Duration (minutes)<99999 [6]<Account Lockout Threshold (invalid logon attempts)<6 [7]<Reset account lockout counter after (minutes)<99999 [8]<Password last changed (YYYY/MM/DD HH:MM:SS local time)<2012/01/25 11:34:53 [9]<Password expires (YYYY/MM/DD HH:MM:SS local time)<2012/07/23 12:34:53 [10]<Password last changed (YYYY/MM/DD HH:MM:SS UTC)<2012/01/25 16:34:53 [11]<Password expires (YYYY/MM/DD HH:MM:SS UTC)<2012/07/23 16:34:53 [12]<Password properties<0
  4. I tried a different username and it worked?! Could it be that my password hasn't been changed for a long time or that it is not set to expire? [0]<12< [1]<Maximum Password Age (days)<180 [2]<Minimum Password Age (days)<-0 [3]<Enforce Password History (# of passwords remembered)<4 [4]<Minimum Password Length<7 [5]<Account Lockout Duration (minutes)<99999 [6]<Account Lockout Threshold (invalid logon attempts)<6 [7]<Reset account lockout counter after (minutes)<99999 [8]<Password last changed (YYYY/MM/DD HH:MM:SS local time)<2011/11/03 12:24:13 [9]<Password expires (YYYY/MM/DD HH:MM:SS local time)<2012/05/01 12:24:13 [10]<Password last changed (YYYY/MM/DD HH:MM:SS UTC)<2011/11/03 16:24:13 [11]<Password expires (YYYY/MM/DD HH:MM:SS UTC)<2012/05/01 16:24:13 [12]<Password properties<0
  5. no errors & same result
  6. no errors #include <AD.au3> $iAD_Debug = 2 ; Open Connection to the Active Directory _AD_Open() >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "L:ApplicationsITAppsfrom_1024-3rn0qd10AutoITv3installScriptsPWDage_AD_GetPasswordInfo.au3" /autoit3dir "C:Program Files (x86)AutoIt3" /UserParams +>11:05:13 Starting AutoIt3Wrapper v.2.0.3.0 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.22.0) params:-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 from:C:Program Files (x86)AutoIt3 +>11:05:13 AU3Check ended.rc:0 >Running:(3.3.8.0):C:Program Files (x86)AutoIt3autoit3.exe "L:ApplicationsITAppsfrom_1024-3rn0qd10AutoITv3installScriptsPWDage_AD_GetPasswordInfo.au3"
  7. Water - I am not getting any value returned for pwdLastSet. Thoughts on this one? I did not modify your script. Using ASDIedit, I do see a value for my pwdLastSet. #AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y ; ***************************************************************************** ; Example 1 ; Get the domain password policy and the password info for the current user ; ***************************************************************************** #include <AD.au3> ; Open Connection to the Active Directory _AD_Open() If @error Then Exit MsgBox(16, "Active Directory Example Skript", "Function _AD_Open encountered a problem. @error = " & @error & ", @extended = " & @extended) ; Get the password info Global $aAD_PwdInfo[13][2] = [[12],["Maximum Password Age (days)"],["Minimum Password Age (days)"],["Enforce Password History (# of passwords remembered)"], _ ["Minimum Password Length"],["Account Lockout Duration (minutes)"],["Account Lockout Threshold (invalid logon attempts)"],["Reset account lockout counter after (minutes)"], _ ["Password last changed (YYYY/MM/DD HH:MM:SS local time)"],["Password expires (YYYY/MM/DD HH:MM:SS local time)"],["Password last changed (YYYY/MM/DD HH:MM:SS UTC)"], _ ["Password expires (YYYY/MM/DD HH:MM:SS UTC)"],["Password properties"]] Global $aTemp = _AD_GetPasswordInfo() For $iCount = 1 To $aTemp[0] $aAD_PwdInfo[$iCount][1] = $aTemp[$iCount] Next $aAD_PwdInfo[0][0] = $aTemp[0] _ArrayDisplay($aAD_PwdInfo, "Active Directory Functions - Example 1", -1, 0, "<") ; Close Connection to the Active Directory _AD_Close() here's the result from running the above, I just copied the result of _arraydisplay - I do not receive any errors. I am running from a win7 x64 against a 2003 server - I also forced the use of PCD, but same result [0]<12< [1]<Maximum Password Age (days)<180 [2]<Minimum Password Age (days)<-0 [3]<Enforce Password History (# of passwords remembered)<4 [4]<Minimum Password Length<7 [5]<Account Lockout Duration (minutes)<99999 [6]<Account Lockout Threshold (invalid logon attempts)<6 [7]<Reset account lockout counter after (minutes)<99999 [8]<Password last changed (YYYY/MM/DD HH:MM:SS local time)< [9]<Password expires (YYYY/MM/DD HH:MM:SS local time)< [10]<Password last changed (YYYY/MM/DD HH:MM:SS UTC)< [11]<Password expires (YYYY/MM/DD HH:MM:SS UTC)< [12]<Password properties<0
  8. Thank you for the quick reply. After reading over _GUIScrollBars_Init() again, it appears that I can make it work by including the GUIcreate within a function. Any suggestions are appreciated since I'm still learning the GUI! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Guiscrollbars.au3> #include <Array.au3> #include <GuiButton.au3> #include <ScrollBarConstants.au3> Opt('GUIOnEventMode', 1) ; Forces OnEvent mode ;~ Opt("MustDeclareVars", 1) _Main() Func _Main() $hGUI = GUICreate("Scroll Testing",200,200,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_VSCROLL)) GUISetOnEvent($GUI_EVENT_CLOSE, "close_program") Dim $aButtons[100][2] $y = 10 for $x = 1 to 99 $aButtons[$x][0] = GUICtrlCreateButton("Button "&$x, 10, $y,75,20);creates buttons and adds controlID to the array $aButtons[$x][1] = "Button "&$x;adds button label to the array GUICtrlSetOnEvent($aButtons[$x][0],"Clicker") $y += 30 Next ;~ GUISwitch($hGUI) ;~ GUIRegisterMsg($WM_SIZE, "WM_SIZE") GUIRegisterMsg($WM_VSCROLL, "WM_VSCROLL") GUIRegisterMsg($WM_HSCROLL, "WM_HSCROLL") _GUIScrollBars_SetScrollRange($hGUI, $SB_VERT, 0, Ubound($aButtons,1)*2) _GUIScrollBars_Init($hGUI) GUISetState() While 1 $GUIMsg = GUIGetMsg() Switch $GUIMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Exit EndFunc Func Clicker() Local $buttonTxt $buttonTxt = _GUICtrlButton_GetText(@GUI_CtrlId) MsgBox(0,"Button Clicked","You clicked "&$buttonTxt) EndFunc Func close_program() GUIDelete() Exit EndFunc Func WM_HSCROLL($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $lParam Local $nScrollCode = BitAND($wParam, 0x0000FFFF) Local $index = -1, $xChar, $xPos Local $Min, $Max, $Page, $Pos, $TrackPos For $x = 0 To UBound($aSB_WindowInfo) - 1 If $aSB_WindowInfo[$x][0] = $hWnd Then $index = $x $xChar = $aSB_WindowInfo[$index][2] ExitLoop EndIf Next If $index = -1 Then Return 0 ;~ ; Get all the horizontal scroll bar information Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_HORZ) $Min = DllStructGetData($tSCROLLINFO, "nMin") $Max = DllStructGetData($tSCROLLINFO, "nMax") $Page = DllStructGetData($tSCROLLINFO, "nPage") ; Save the position for comparison later on $xPos = DllStructGetData($tSCROLLINFO, "nPos") $Pos = $xPos $TrackPos = DllStructGetData($tSCROLLINFO, "nTrackPos") #forceref $Min, $Max Switch $nScrollCode Case $SB_LINELEFT ; user clicked left arrow DllStructSetData($tSCROLLINFO, "nPos", $Pos - 1) Case $SB_LINERIGHT ; user clicked right arrow DllStructSetData($tSCROLLINFO, "nPos", $Pos + 1) Case $SB_PAGELEFT ; user clicked the scroll bar shaft left of the scroll box DllStructSetData($tSCROLLINFO, "nPos", $Pos - $Page) Case $SB_PAGERIGHT ; user clicked the scroll bar shaft right of the scroll box DllStructSetData($tSCROLLINFO, "nPos", $Pos + $Page) Case $SB_THUMBTRACK ; user dragged the scroll box DllStructSetData($tSCROLLINFO, "nPos", $TrackPos) EndSwitch ;~ // Set the position and then retrieve it. Due to adjustments ;~ // by Windows it may not be the same as the value set. DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS) _GUIScrollBars_SetScrollInfo($hWnd, $SB_HORZ, $tSCROLLINFO) _GUIScrollBars_GetScrollInfo($hWnd, $SB_HORZ, $tSCROLLINFO) ;// If the position has changed, scroll the window and update it $Pos = DllStructGetData($tSCROLLINFO, "nPos") If ($Pos <> $xPos) Then _GUIScrollBars_ScrollWindow($hWnd, $xChar * ($xPos - $Pos), 0) Return $GUI_RUNDEFMSG EndFunc ;==>WM_HSCROLL Func WM_VSCROLL($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $wParam, $lParam Local $nScrollCode = BitAND($wParam, 0x0000FFFF) Local $index = -1, $yChar, $yPos Local $Min, $Max, $Page, $Pos, $TrackPos For $x = 0 To UBound($aSB_WindowInfo) - 1 If $aSB_WindowInfo[$x][0] = $hWnd Then $index = $x $yChar = $aSB_WindowInfo[$index][3] ExitLoop EndIf Next If $index = -1 Then Return 0 ; Get all the vertial scroll bar information Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_VERT) $Min = DllStructGetData($tSCROLLINFO, "nMin") $Max = DllStructGetData($tSCROLLINFO, "nMax") $Page = DllStructGetData($tSCROLLINFO, "nPage") ; Save the position for comparison later on $yPos = DllStructGetData($tSCROLLINFO, "nPos") $Pos = $yPos $TrackPos = DllStructGetData($tSCROLLINFO, "nTrackPos") Switch $nScrollCode Case $SB_TOP ; user clicked the HOME keyboard key DllStructSetData($tSCROLLINFO, "nPos", $Min) Case $SB_BOTTOM ; user clicked the END keyboard key DllStructSetData($tSCROLLINFO, "nPos", $Max) Case $SB_LINEUP ; user clicked the top arrow DllStructSetData($tSCROLLINFO, "nPos", $Pos - 1) Case $SB_LINEDOWN ; user clicked the bottom arrow DllStructSetData($tSCROLLINFO, "nPos", $Pos + 1) Case $SB_PAGEUP ; user clicked the scroll bar shaft above the scroll box DllStructSetData($tSCROLLINFO, "nPos", $Pos - $Page) Case $SB_PAGEDOWN ; user clicked the scroll bar shaft below the scroll box DllStructSetData($tSCROLLINFO, "nPos", $Pos + $Page) Case $SB_THUMBTRACK ; user dragged the scroll box DllStructSetData($tSCROLLINFO, "nPos", $TrackPos) EndSwitch ;~ // Set the position and then retrieve it. Due to adjustments ;~ // by Windows it may not be the same as the value set. DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS) _GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO) _GUIScrollBars_GetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO) ;// If the position has changed, scroll the window and update it $Pos = DllStructGetData($tSCROLLINFO, "nPos") If ($Pos <> $yPos) Then _GUIScrollBars_ScrollWindow($hWnd, 0, $yChar * ($yPos - $Pos)) $yPos = $Pos EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_VSCROLL
  9. Hi, Is there a way to use OnEventMode with scrollbars? I am only finding examples for Msg Mode. Thank you. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Guiscrollbars.au3> #include <Array.au3> #include <GuiButton.au3> Opt('GUIOnEventMode', 1) ; Forces OnEvent mode $hGUI = GUICreate("Scroll Testing",200,200,-1,-1,BitOR($GUI_SS_DEFAULT_GUI,$WS_VSCROLL)) GUISetOnEvent($GUI_EVENT_CLOSE, "close_program") Dim $aButtons[100][2] $y = 10 for $x = 1 to 99 $aButtons[$x][0] = GUICtrlCreateButton("Button "&$x, 10, $y,75,20);creates buttons and adds controlID to the array $aButtons[$x][1] = "Button "&$x;adds button label to the array ;;;;;;;;;;not needed for this example GUICtrlSetOnEvent($aButtons[$x][0],"Clicker") $y += 30 Next GUISetState() _GUIScrollBars_Init($hGUI) While 1 Sleep(1000) WEnd Func Clicker() Local $buttonTxt $buttonTxt = _GUICtrlButton_GetText(@GUI_CtrlId) MsgBox(0,"Button Clicked","You clicked "&$buttonTxt) EndFunc Func close_program() GUIDelete() Exit EndFunc
  10. I ran into the same issue. Will DirGetSize work with UNC paths over the WAN? I get results for UNC path for my local server, but my not for a remote server. Thoughts? My main goal is to get folder size, file & folder counts on a remote server share. Thanks, Turkey77
×
×
  • Create New...