ChrisL Posted November 3, 2005 Share Posted November 3, 2005 Anyone noticed that process close doesn't always work very well? Iv'e used it to close a remote control program but it doesn't seem very reliable, I have called PSKILL instead which works every time, is this a floor in the way AutoIT closes processes, could or should it have the ability to kill a process like PS tools? Any thoughts [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Valuater Posted November 3, 2005 Share Posted November 3, 2005 (edited) Maybe..... WinClose() or WinKill() 8) Edited November 3, 2005 by Valuater Link to comment Share on other sites More sharing options...
Nuffilein805 Posted November 3, 2005 Share Posted November 3, 2005 Maybe.....WonClose()orWinKill()8)hm, wonclose() is a nice way of closing a wondow at least some of you're making fun my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
ChrisL Posted November 3, 2005 Author Share Posted November 3, 2005 Maybe.....WinClose()orWinKill()8)That is no good I'm affraid as it's a process that is running but no window is open [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
w0uter Posted November 3, 2005 Share Posted November 3, 2005 pskill uses terminateprocess. i dont know what autoit uses. (i think the same) My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Valik Posted November 3, 2005 Share Posted November 3, 2005 AutoIt uses TerminateProcess(), too. Link to comment Share on other sites More sharing options...
w0uter Posted November 3, 2005 Share Posted November 3, 2005 it also uses TerminateThread on threads. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
hankjrfan Posted November 4, 2005 Share Posted November 4, 2005 I always do this $pid=Run("Notepad.exe") While ProcessExists($pid) Then ProcessClose($pid) WEnd Link to comment Share on other sites More sharing options...
w0uter Posted November 4, 2005 Share Posted November 4, 2005 what if it doesnt want to close ? then your script will loop forever My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
MHz Posted November 4, 2005 Share Posted November 4, 2005 (edited) I have not once needed to resort to a loop to close a proess. If I did, a For loop would always be chosen 1st. Most processes will close but some very few may refuse. I would assume that the process in the 1st post ignores a shutdown message for the sake of security? I do not like the idea of killimg processes dead in their tracks unless they are malicous to start with. ProcessClose() seems to do ok by my vote. Edited November 4, 2005 by MHz Link to comment Share on other sites More sharing options...
ChrisL Posted November 4, 2005 Author Share Posted November 4, 2005 what if it doesnt want to close ?then your script will loop forever That is pretty much the issue, processclose sometimes doesn't close it where as pskill does! [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
MHz Posted November 4, 2005 Share Posted November 4, 2005 Well, if it is sometimes fails with this process then try this loop. Change the ?.exe to your process. For $i = 1 To 5 If ProcessExists('?.exe') Then ProcessClose('?.exe') Sleep(1000) Else ExitLoop EndIf Next 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