Kenshei 0 Posted January 18, 2016 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
Jfish 125 Posted January 19, 2016 (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 January 21, 2016 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