Kenshei Posted January 18, 2016 Share 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! Link to comment Share on other sites More sharing options...
Jfish Posted January 19, 2016 Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now