Jump to content

Killing autoit from command line (windows .bat file)?


Recommended Posts

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

I use taskkill

omikron48 - just beat me to it - seconds in it.

Edited 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

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

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 by utahwebdev
Link to comment
Share on other sites

#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 by KaFu
Link to comment
Share on other sites

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

#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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...