utahwebdev Posted June 11, 2010 Share Posted June 11, 2010 I'm running autoit scripts on different user accounts of a windows server 2008 machine and some of the .exe's that i have made are seemingly "acting up" as they are doing weird things, like running more than once when they shouldn't (i'm executing the script from within a vbscript)... I've been trying to figure out how kill the autoit exe from the command line but I'm not having any success, does anyone know what the correct command would be to do this? Link to comment Share on other sites More sharing options...
omikron48 Posted June 11, 2010 Share Posted June 11, 2010 taskkill, look it up. Better yet, you could have tried Googling: windows kill process. Link to comment Share on other sites More sharing options...
bo8ster Posted June 11, 2010 Share Posted June 11, 2010 (edited) I use taskkill omikron48 - just beat me to it - seconds in it. Edited June 11, 2010 by bo8ster Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
omikron48 Posted June 11, 2010 Share Posted June 11, 2010 FIRST! Link to comment Share on other sites More sharing options...
bo8ster Posted June 11, 2010 Share Posted June 11, 2010 LOL! The complete solution taskkill /IM autoit3.exe /F /T I put that in a bat file in my quick launch. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
utahwebdev Posted June 11, 2010 Author Share Posted June 11, 2010 (edited) yeah i know about taskkill,i was asking for what specifically to kill as everything i had tried was not working, (also autoit.exe doesn't show up anywhere it seems in the windows process monitor, etc as I was checking this) i tried something close this "taskkill /IM autoit3.exe /F /T" and it didn't work but i'll try this specifically to see if it works Edited June 11, 2010 by utahwebdev Link to comment Share on other sites More sharing options...
KaFu Posted June 11, 2010 Share Posted June 11, 2010 (edited) #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=processclose.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; Compile and call with "processclose.exe autoit3.exe" $timer = TimerInit() while ProcessExists($CmdLineRaw) ProcessClose($CmdLineRaw) if TimerDiff($timer) > 5000 Then MsgBox(16+262144,"Processclose Error","Not all instances of " & $CmdLineRaw & " could be killed in 5 seconds...") Exit endif WEnd Edited June 11, 2010 by KaFu  OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
utahwebdev Posted June 11, 2010 Author Share Posted June 11, 2010 well that command didn't work, I don't know if its because I'm using windows server, or what, but after trying this more I realized it shows up as a process called "apgmgmt" or something like that so I will see if I can try to kill that Link to comment Share on other sites More sharing options...
utahwebdev Posted June 11, 2010 Author Share Posted June 11, 2010 #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=processclose.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; Compile and call with "processclose.exe autoit3.exe" $timer = TimerInit() while ProcessExists($CmdLineRaw) ProcessClose($CmdLineRaw) if TimerDiff($timer) > 5000 Then MsgBox(16+262144,"Processclose Error","Not all instances of " & $CmdLineRaw & " could be killed in 5 seconds...") Exit endif WEnd thanks, thats the better way to do it, I should have thought of doing it that way in vbscript Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 11, 2010 Share Posted June 11, 2010 You can't use $CmdLineRaw because that includes the AutoIt script in the string. 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