Kenshei

Problems with progresslist

2 posts in this topic

I code a simple function to delete all progress "cmd.exe". I run it in Win 10 and win server 2008 rc2 activated, it run good, delete all cmd.exe. When I run it in a VPS Win server 2008 rc2 active 180 days, it just delete 1 of them. Plz help me.

Func DelCmd()
    If ProcessExists("cmd.exe") Then
        $icmd = ProcessList("cmd.exe")
        For $i = 1 To $icmd[0][0]
            ProcessClose("cmd.exe")
        Next
    Else
        MsgBox($MB_SYSTEMMODAL, "", "There is no CMD is exist!")
    EndIf
EndFunc

Maybe in VPS, if win is not active, script can not run correct? Who can explain for me? Thank everyone for help!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I was not aware you could set the stop value of the for loop to an array.  Have you tried

I see now that contains the number of processes ... did not have enough coffee that day :>

 

Edited by Jfish

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

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