ur

how to save credentials of network shares in windows

20 posts in this topic

Whenever we try to access a network share it will prompt for credentials based on the shared folder settings.

Like the below prompt

d1.PNG

d2.PNG

Once you save them, they are saved in Windows Credentials of Credentials Manager in Control panel (run --> control keymgr.dll).

d3.PNG

 

But not able to found exact file or registry for this setting.

 

So, can anyone suggest how to do this process of adding network credentials using AutoIT.

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Easy... put a file .bat on C:\\ .... and execute it on windows load..."Autostart". This is an old trick

Edited by rootx

Share this post


Link to post
Share on other sites
1 hour ago, rootx said:

Easy... put a file .bat on C:\\ .... and execute it on windows load..."Autostart". This is an old trick

But what we need to keep in the batch file is the question then.

Because I don't find any command line options to access the credential manager

Share this post


Link to post
Share on other sites
27 minutes ago, orbs said:

Thank you very much.

Don't know why it didn't came in Google search :)

To add credentials..
 

cmdkey /add:sharedmachine /user:domainname\username /pass:password

To remove credentials.

cmdkey /delete:sharedmachine

I will use them using run command to execute in my code.

Share this post


Link to post
Share on other sites
34 minutes ago, ur said:

But what we need to keep in the batch file is the question then.

Because I don't find any command line options to access the credential manager

First learn https://technet.microsoft.com/en-us/library/bb490717.aspx

Second....

local user net use d:\\server\share /user:Dan  password     or net use d:\\server\share /user:Accounts\Dan password

Domain net use d:\\server\share /user:DOMAIN\Dan password

Then to have persistent add /persistent:yes

Share this post


Link to post
Share on other sites

One more question.

Is there any way to view these passwords??

Share this post


Link to post
Share on other sites
1 minute ago, ur said:

One more question.

Is there any way to view these passwords??

add swith /savecred

Share this post


Link to post
Share on other sites
2 minutes ago, ur said:

One more question.

Is there any way to view these passwords??

??what do you mean

Share this post


Link to post
Share on other sites
3 minutes ago, rootx said:

First learn https://technet.microsoft.com/en-us/library/bb490717.aspx

Second....

local user net use d:\\server\share /user:Dan  password     or net use d:\\server\share /user:Accounts\Dan password

Domain net use d:\\server\share /user:DOMAIN\Dan password

Then to have persistent add /persistent:yes

I am getting the below error when I try the net use

 

System error 67 has occurred.

The network name cannot be found.

Share this post


Link to post
Share on other sites

What you wroted in the batch, and the 4 the last question pwd look at nirsoft Network Password Recovery.

Share this post


Link to post
Share on other sites

net use \\servername\ /user:~\username password

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

net use Z: \\ipserver\ /user:\username password

Edited by rootx

Share this post


Link to post
Share on other sites
3 minutes ago, rootx said:

net use Z: \\ipserver\ /user:\username password

ok..for mapping the network drives right..

But I need to access the network share directly as the number of shares are more than 26 :)

The cmdkey is working.I am able to access the share once I add the credentials to credential manager.

Share this post


Link to post
Share on other sites

ok, try the normal cmd with Admin privilege....  net use \\ipserver\ this grant you to access to all shares

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

4 minutes ago, jguinch said:

An AutoIt code answer (because it's a forum about AutoIt) :

DriveMapAdd("", "\\ukreddy-e7470\c$", 0, "username", "password")

 

DriveMapAdd("", "\\ukreddy-e7470\c$", 1, "username", "password")

persistent. and require #RequireAdmin

Edited by rootx

Share this post


Link to post
Share on other sites

Hi ur,

I prefer not to rely on external programs/tools so let me share an alternative approach to cmdkey.exe. I didn't write this, but I modified it to work for my needs. In my script I actually encrypt the password prior to storing it. Hopefully, this will make it easier for you.

 

#include <Array.au3>

$User = "user1"
$Password = "password1"
$AppName = "My App"
$Comment = "Used For ABC"

_Cred_Write($User, $Password) ; Write to Crediential Manager

$aArray = _Cred_Read() ; Read from Crediential Manager
_ArrayDisplay($aArray)

_Cred_Delete() ; Delete Credientials


Func _Cred_Write($User, $Password, $iPersist = 1, $Target = $AppName, $Comm = $Comment)
    ; iPersist
    ; SESSION = 1
    ; LOCAL_MACHINE = 2
    ; ENTERPRISE = 3

    Local $Comment = DllStructCreate("wchar[100]")
    DllStructSetData($Comment, 1, $Comm)

    Local $targetName = DllStructCreate("wchar[100]")
    DllStructSetData($targetName, 1, $Target)

    Local $userName = DllStructCreate("wchar[100]")
    DllStructSetData($userName, 1, $User)

    Local $credentialBlob = DllStructCreate("wchar[100]")
    DllStructSetData($credentialBlob, 1, $Password)

    Local $structCREDENTIAL = "" & _
            "DWORD Flags;" & _
            "DWORD Type;" & _
            "Ptr TargetName;" & _
            "Ptr Comment;" & _
            "UINT64 LastWritten;" & _
            "DWORD CredintialBlobSize;" & _
            "Ptr CredentialBlob;" & _
            "DWORD Persist;" & _
            "DWORD AttributeCount;" & _
            "ptr Attributes;" & _
            "Ptr TargetAlias;" & _
            "Ptr Username"

    Local $NewCred = DllStructCreate($structCREDENTIAL)
    If @error Then
        MsgBox(0, "NewCred", "Error in DllStructCreate " & @error) ;
        Exit
    EndIf

    DllStructSetData($NewCred, "Flags", 0)
    DllStructSetData($NewCred, "Type", 1)
    DllStructSetData($NewCred, "TargetName", DllStructGetPtr($targetName))
    DllStructSetData($NewCred, "Persist", $iPersist)
    DllStructSetData($NewCred, "AttributeCount", 0)
    DllStructSetData($NewCred, "UserName", DllStructGetPtr($userName))
    DllStructSetData($NewCred, "CredentialBlob", DllStructGetPtr($credentialBlob))
    DllStructSetData($NewCred, "CredintialBlobSize", StringLen($Password) * 2)
    DllStructSetData($NewCred, "Comment", DllStructGetPtr($Comment))

    #comments-start
        MsgBox(0, "DllStruct", "Data:" & @CRLF & _
        "Flags: " & DllStructGetData($NewCred, "Flags") & @CRLF & _
        "Type: " & DllStructGetData($NewCred,"Type") & @CRLF & _
        "TargetName: " &  DllStructGetData($NewCred,"TargetName") & @CRLF & _
        "Persist: " & DllStructGetData($NewCred,"Persist") & @CRLF & _
        "AttributeCount: " &  DllStructGetData($NewCred,"AttributeCount") & @CRLF & _
        "UserName: " &  DllStructGetData($NewCred,"UserName") & @CRLF & _
        "CredentialBlob: " &  DllStructGetData($NewCred,"CredentialBlob") & @CRLF & _
        "CredintialBlobSize: " &  DllStructGetData($NewCred,"CredintialBlobSize") & @CRLF & _
        "Comment: " &  DllStructGetData($NewCred,"Comment"))
    #comments-end

    Local $hAdvapi32 = DllOpen("Advapi32.dll")
    If @error Then
        MsgBox(0, "Error", "Cannot open Advapi32.dll")
        Exit
    EndIf
    Local $aRet = DllCall($hAdvapi32, 'bool', 'CredWriteW', 'ptr', DllStructGetPtr($NewCred), 'dword', 0)

    $NewCred = 0
EndFunc

Func _Cred_Read($Target = $AppName)
    Local $aFuncRet[3]
    Local $iType = 1 ; 1 = Generic | 2 = Domain | 3 = Certificate

    Local $targetName = DllStructCreate("wchar[100]")
    DllStructSetData($targetName, 1, $Target)

    Local $hAdvapi32 = DllOpen("Advapi32.dll")
    Local $aRet = DllCall($hAdvapi32, 'bool', 'CredReadW', 'ptr', DllStructGetPtr($targetName), 'dword', $iType, 'dword', 0, 'ptr*', 0)

    If $aRet[0] = 0 Then Return SetError(1, 0)

    Local $structCREDENTIAL = "" & _
            "DWORD Flags;" & _
            "DWORD Type;" & _
            "Ptr TargetName;" & _
            "Ptr Comment;" & _
            "UINT64 LastWritten;" & _
            "DWORD CredintialBlobSize;" & _
            "Ptr CredentialBlob;" & _
            "DWORD Persist;" & _
            "DWORD AttributeCount;" & _
            "Ptr Attributes;" & _
            "Ptr TargetAlias;" & _
            "Ptr Username"

    Local $tdata = DllStructCreate($structCREDENTIAL, $aRet[4])

    Local $userName = DllStructCreate("wchar[100]", DllStructGetData($tdata, 'Username'))
    Local $sUser = DllStructGetData($userName, 1)

    Local $CredentialBlobSize = DllStructGetData($tdata, 'CredintialBlobSize')
    Local $credentialBlob = DllStructCreate("wchar[100]", DllStructGetData($tdata, 'CredentialBlob'))
    Local $sPassword = StringLeft(DllStructGetData($credentialBlob, 1), $CredentialBlobSize / 2)

    Local $Comment = DllStructCreate("wchar[100]", DllStructGetData($tdata, 'Comment'))
    Local $sComm = DllStructGetData($Comment, 1)

    Dim $aFuncRet[] = [$sUser, $sPassword, $sComm]
    Return $aFuncRet
EndFunc

Func _Cred_Delete($Target = $AppName)
    Local $aRet
    Local $targetName = DllStructCreate("wchar[100]")
    DllStructSetData($targetName, 1, $Target)

    Local $hAdvapi32 = DllOpen("Advapi32.dll")
    $aRet = DllCall($hAdvapi32, 'bool', 'CredDeleteW', 'ptr', DllStructGetPtr($targetName), 'dword', 1, 'dword', 0)
EndFunc

 

2 people like this

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

  • Similar Content

    • nacerbaaziz
      By nacerbaaziz
      Hi dear
      I have a question
      about the display language of the system
      How can I get the current display language and how can I change it by autoit
      Of course, if this is possible
      Greetings to all and hope you help me
    • breakbadsp
      By breakbadsp
      AutoIT AU3info doeas not detect all gui objects uniquely for .NET GUIs developed in C#.
      this is not working now i am using COM windows approach for this, But its very difficult.
      Please let me know if anyone has done it before.
    • dascondor
      By dascondor
      So I having issues with this GUI/Listview. My main GUI works like it needs to but the ListView GUIs don't. The exit buttons do not work on them and om have a hard time getting them to work. And I'm trying to make the  listview GUI resizeable. But I'm not sure how to fix either of these issues any thoughts.
      #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <File.au3> #include <ScreenCapture.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #include <Array.au3> #include <GuiListView.au3> #include <GuiImageList.au3> #include <ListviewConstants.au3> #include 'MultiPing.au3' Opt("GUIOnEventMode", 1) #Region ;Declares ; Reads text file for the base list of IP's Global $aBase_IPlist = _FileReadToArray_mod(".\IP_List.txt") Global $replace2 = "Second" Global $replace3 = "Thrid" ;Global $userdata1 = GUICtrlRead($data1) ;Global $userdata2 = GUICtrlRead($data2) Global $savefolder = "C:\Users\" Global $paths = "\Desktop\PingChecks" Global $1stpaths = "\~~~Store" Global $2ndpaths = "~~~" Global $results = FileExists($savefolder & @UserName & $paths) ;Global $foldercheck = FileExists($savefolder & @UserName & $paths & $1stpaths & $userdata1 & $userdata2 & $2ndpaths) ;Global $savefile = "C:\Users\" & @UserName & "\Desktop\PingChecks\~~~Store" & $userdata1 & $userdata2 & "~~~\" #EndRegion ;Declares #Region ### START Koda GUI section ### Form= $IPMonkey = GUICreate("IP Monkey", 573, 254, -1, -1) GUISetIcon("C:\Users\Dlex\Pictures\monkeyicon.ico", -1) GUISetFont(16, 800, 0, "Arial") GUISetBkColor(0xFFFFFF) GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_MAXIMIZE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents") $data1 = GUICtrlCreateInput("1", 184, 120, 89, 32, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER)) GUICtrlSetColor(-1, 0x000000) $data2 = GUICtrlCreateInput("23", 280, 120, 89, 32, BitOR($GUI_SS_DEFAULT_INPUT, $ES_CENTER)) GUICtrlSetColor(-1, 0x000000) $GOButton = GUICtrlCreateButton("GO", 80, 192, 75, 25) GUICtrlSetFont(-1, 10, 800, 0, "Arial") GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x00FF00) GUICtrlSetTip(-1, "Runs A Live Continuous Ping" & @CRLF & _ "Until Told Other Wise") GUICtrlSetOnEvent(-1, "GOButtonClick") $quickscan = GUICtrlCreateButton("Quick Scan", 224, 192, 107, 25) GUICtrlSetFont(-1, 12, 800, 0, "Arial") GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xFFFF00) GUICtrlSetOnEvent(-1, "quickscanClick") GUICtrlSetTip(-1, "Quickly Scans, Then Saves" & @CRLF & _ "Results In Your 'PingChecks' " & @CRLF & _ "Folder Under Your Store Number Folder") Global $exitbutton = GUICtrlCreateButton("Exit", 416, 192, 75, 25) GUICtrlSetFont(-1, 12, 800, 0, "Arial") GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlSetTip(-1, "What Do You Think This Button Does?") GUICtrlSetOnEvent(-1, "exitbuttonClick") $titlebar = GUICtrlCreateLabel("IP Monkey", 16, 120, 107, 28) GUICtrlSetColor(-1, 0x000000) $Pic1 = GUICtrlCreatePic("C:\Users\Dlex\Pictures\monkeyicon-0.jpg", 16, 16, 100, 100) GUICtrlSetOnEvent(-1, "Pic1Click") $infobutton = GUICtrlCreateButton("?", 536, 8, 27, 25) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xFF8000) GUICtrlSetTip(-1, "Unsure what to do?" & @CRLF & _ "This will get give you " & @CRLF & _ "the help for IP Monkey") GUICtrlSetOnEvent(-1, "infobuttonClick") $Whatstorelabel = GUICtrlCreateLabel("What Store?", 208, 56, 130, 28) GUICtrlSetColor(-1, 0x000000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### #Region ;ping gui ; ------ pinger GUI ------------------- Global $StopPing = 0 Local $Win_X = 1200, $Win_Y = 880 ; dimension of window Global $PingGui = GUICreate("IP Monkey", $Win_X, $Win_Y, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") Global $listview = GUICtrlCreateListView("", 10, 10, $Win_X - 20, $Win_Y - 40) GUICtrlSetFont(-1, 8) $button1 = GUICtrlCreateLabel("Hit Exit To Quit", 10, $Win_Y - 25, $Win_X - 20, 20, -1,$ES_CENTER) GUICtrlSetFont(-1, 10, 800) GUICtrlSetTip(-1, "exit") GUICtrlSetOnEvent(-1, 'SpecialEvents') GUICtrlSetStyle($listview, $LVS_ICON) ; + $LVS_NOLABELWRAP) GUISetState(@SW_HIDE) ; hidden at startup ; --------- end of pinger gui ------------- #EndRegion ;ping gui ; Generate colored square images $hImage = _GUIImageList_Create(30, 30) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($listview, 0xFFFF00, 30, 30)) ; yellow _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($listview, 0xFF0000, 30, 30)) ; red _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($listview, 0x00FF00, 30, 30)) ; green _GUICtrlListView_SetImageList($listview, $hImage, 0) While 1 Sleep(100) WEnd Func exitbuttonClick() MsgBox(0,'0','0') Exit EndFunc ;==>exitbuttonClick Func GOButtonClick() $userdata1 = GUICtrlRead($data1) $userdata2 = GUICtrlRead($data2) ; pass the wanted new octet replace_And_Go($userdata1, $userdata2) ; generate a list of new IP and Go EndFunc ;==>GOButtonClick Func infobuttonClick() EndFunc ;==>infobuttonClick Func Pic1Click() EndFunc ;==>Pic1Click Func quickscanClick() $userdata1 = GUICtrlRead($data1) $userdata2 = GUICtrlRead($data2) replace_And_Go2($userdata1, $userdata2) EndFunc ;==>quickscanClick Func SpecialEvents() Select Case @GUI_CtrlId = $GUI_EVENT_CLOSE _button1() Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE Case @GUI_CtrlId = $GUI_EVENT_RESTORE Case @GUI_CtrlId = $GUI_EVENT_MAXIMIZE EndSelect EndFunc ;==>SpecialEvents #Region ; Main_GO/Replace_and_GO #cs ############################## second script ############################################# ; this is to ping continuously a list of IP addresses, get and display ping result "live" ; it simulates the dos "ping -t" command but performed simultaneously on many IP ; presenting the results in a ListView highlighting not responding devices with a red box #ce Func replace_And_Go($s_2, $s_3) ; Create a new array wit a new list of IP according to passed second and third octet Local $aNew_IPlist = $aBase_IPlist For $i = 0 To UBound($aNew_IPlist) - 1 $aNew_IPlist[$i][1] = StringReplace(StringReplace($aBase_IPlist[$i][1], $replace2, $s_2), $replace3, $s_3) Next GUISetState(@SW_HIDE, $IPMonkey) GUISetState(@SW_SHOW, $PingGui) ; pass the new list to the pinger Main_GO($aNew_IPlist) GUISetState(@SW_HIDE, $PingGui) GUISetState(@SW_SHOW, $IPMonkey) EndFunc ;==>replace_And_Go Func Main_GO($IPlist) HotKeySet("{esc}", "exitbuttonClick") $StopPing = 0 ; $IPlist = _FileReadToArray_mod(".\IP_List.txt") ; Reads text file for list of IP's ; ; the above command, it loads in the $IPlist array the values contained in the file IP_List.txt ; values in the file should be separated by a semicolon, something like in the following example: ; ; hostname1;192.168.0.1 ; hostname2;192.168.0.5 ; hostnameX;10.59.7.200 ; etc.... ; ; if values in the file are not separated by a semicolon, but another char is used, for example a comma, ; then just pass it as second parameter of the function: $IPlist = _FileReadToArray_mod(".\IP_List.txt", ",") ; _GUICtrlListView_BeginUpdate($listview) _GUICtrlListView_DeleteAllItems($listview) _GUICtrlListView_AddArray($listview, $IPlist) ; fill ListView _GUICtrlListView_EndUpdate($listview) While Not $StopPing ; 1 ; continuously ping addresses of the previously loaded file (IP_List.txt) Sleep(10) ; ; $IPlist is the array loaded with all the IP to be pinged (a 2d array in this case) ; | ; | 1 means the IP are in the second column of the $IPlist array (first colun is nr. 0) ; | | ; | | +--> 0 means return back an array loaded with results from all pinged addresses (responding and not responding) ; | | | if you use 1 then only responding addresses are loaded in the returned array [default] ; | | | if you use 2 then only NOT responding addresses are loaded in the returned array ; | | | In this case we do not need an array to be returned, we only need to perform all pings and pass results ; | | | directly (on the fly) to the "_refresh" callback function that will refresh the listview ; | | | ; | | | 0 means NO lookup name resolution must be performed ; | | | | ; | | | | +--> this is the callback function to be called for each pinged address each time the ping has finished ; | | | | | (see the MultiPing.au3 file for info on all passed params) ; | | | | | 6 parameters are passed to this function, but only 2 are used by the called function in this case: ; | | | | | [4] roundtrip of the responding ping or -1 if IP is down ; | | | | | [5] Index (position) of this IP within the caller's passed array ; | | | | | ; v v v v v _nPing($IPlist, 1, 0, 0, "_refresh") WEnd EndFunc ;==>Main_GO #EndRegion ; Main_GO/Replace_and_GO #Region ; QuickScan/Replace_and_GO2 Func replace_And_Go2($s_2, $s_3) ; Create a new array wit a new list of IP according to passed second and third octet Local $aNew_IPlist = $aBase_IPlist For $i = 0 To UBound($aNew_IPlist) - 1 $aNew_IPlist[$i][1] = StringReplace(StringReplace($aBase_IPlist[$i][1], $replace2, $s_2), $replace3, $s_3) Next GUISetState(@SW_HIDE, $IPMonkey) GUISetState(@SW_SHOW, $PingGui) ; pass the new list to the pinger QuickRun($aNew_IPlist) GUISetState(@SW_HIDE, $PingGui) GUISetState(@SW_SHOW, $IPMonkey) EndFunc ;==>replace_And_Go2 Func QuickRun($IPlist) $userdata1 = GUICtrlRead($data1) $userdata2 = GUICtrlRead($data2) HotKeySet("{esc}", "_button1") Local $Win_X = 1200, $Win_Y = 880 ; dimension of window $PingGui = GUICreate("IP Monkey" & "~~~" & @UserName & "~~~" & "Store" & $userdata1 & $userdata2 & "~~~" & @MON & "." & @MDAY & "." & @YEAR & "~~~" & @HOUR & "." & @MIN, $Win_X, $Win_Y, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "_button1", $PingGui) $listview = GUICtrlCreateListView("", 10, 10, $Win_X - 20, $Win_Y - 40) GUICtrlSetFont(-1, 8) GUICtrlSetStyle($listview, $LVS_ICON) ; + $LVS_NOLABELWRAP) ; Generate colored square images $hImage = _GUIImageList_Create(30, 30) _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($listview, 0xFFFF00, 30, 30)) ; yellow _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($listview, 0xFF0000, 30, 30)) ; red _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($listview, 0x00FF00, 30, 30)) ; green _GUICtrlListView_SetImageList($listview, $hImage, 0) $button1 = GUICtrlCreateButton("Exit", 10, $Win_Y - 25, $Win_X - 20, 20) GUICtrlSetTip(-1, "End of program") GUICtrlSetOnEvent(-1, "exitbuttonClick") GUISetState(@SW_SHOW) ;~ $IPlist = _FileReadToArray_mod(".\IP_List.txt") ; Reads text file for list of IP's _GUICtrlListView_BeginUpdate($listview) _GUICtrlListView_AddArray($listview, $IPlist) ; fill ListView _GUICtrlListView_EndUpdate($listview) ;While 1 ; perform Pings and update ListView by the "_refresh" callback function $aFinalResult = _nPing($IPlist, 1, 0, 0, "_refresh") ;~ _ArrayDisplay($aFinalResult) ;DirCheck() EndFunc ;==>QuickRun #EndRegion ; QuickScan/Replace_and_GO2 #Region ; Misc Funcs (network) Func _refresh($Params) ; this receive ping results and displays them in the ListView _GUICtrlListView_SetItemImage($listview, $Params[5], 0) ; set colour to Yellow Sleep(50) ; a little wait If $Params[4] = -1 Then ; Device not responding to ping _GUICtrlListView_SetItemImage($listview, $Params[5], 1) ; set colour to RED _GUICtrlListView_EnsureVisible($listview, $Params[5]) ; Position view to this item Else ; Device responds to ping _GUICtrlListView_SetItemImage($listview, $Params[5], 2) ; set colour to GREEN EndIf EndFunc ;==>_refresh Func _button1() ; Button 1 clicked ;~ $StopPing = 1 Exit EndFunc ;==>_button1 #EndRegion ; Misc Funcs (network)  
      MultiPing.au3
      IP_List.txt
    • ur
      By ur
      With _WinWaitActivate we can wait for a window to process it.
      But is there any logic so that we can wait for this window title and based on the window text (like 2 or more patterns will be there) we can click yes or no on the window.
       
      Func _WinWaitActivate($title,$text,$timeout=0)
       WinWait($title,$text,$timeout)
       If Not WinActive($title,$text) Then WinActivate($title,$text)
       WinWaitActive($title,$text,$timeout)
      EndFunc
    • wtarkan
      By wtarkan
      If I create a service to run a program , Application window cannot Appear - How can I make the App window visible