Jump to content

Recommended Posts

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
Posted

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

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
Posted

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

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
×
×
  • Create New...