Sign in to follow this  
Followers 0
Hollowpoint

How to terminate processes?

5 posts in this topic

#1 ·  Posted (edited)

I'm sorry if this is a rather newblie question, but is there a way to end processes using an AutoIt script directly, rather than using it to execute task manager and then sending the commands to terminate the processes? I'm working on a script that copies and deletes some files via run(@COMSPEC & '/k "...."', @WORKINGDIR, @SW_HIDE), and it keeps leaving LOTS of cmd.exe processes. Is there an easy way to automate their destruction?

Thanks.

Edited by Hollowpoint

Share this post


Link to post
Share on other sites



processclose

Share this post


Link to post
Share on other sites

I'm sorry if this is a rather newblie question, but is there a way to end processes using an AutoIt script directly, rather than using it to execute task manager and then sending the commands to terminate the processes? I'm working on a script that copies and deletes some files via run(@COMSPEC & '/k "...."', @WORKINGDIR, @SW_HIDE), and it keeps leaving LOTS of cmd.exe processes. Is there an easy way to automate their destruction?

Thanks.

ProcessClose() can close processes, but you are better off using the /c switch with @ComSpec which will terminate it automatically once done rather then the /k switch which keeps @ComSpec open.

:P

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

ProcessClose() can close processes, but you are better off using the /c switch with @ComSpec which will terminate it automatically once done rather then the /k switch which keeps @ComSpec open.

:P

Thanks. Wouldn't have thought of that.

Is there a section in the documentation with the parameters and switches for the various commands and macros?

Edited by Hollowpoint

Share this post


Link to post
Share on other sites

Thanks. Wouldn't have thought of that.

Is there a section in the documentation with the parameters and switches for the various commands and macros?

Your referring to @Comspec?, then bring up a command prompt and type cmd /?. For general help type help /? and items in the help list type item /?, replace item with the command for the information for it.

AutoIt3 switches are in the helpfile here.

:P

Share this post


Link to post
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
Sign in to follow this  
Followers 0