vrocco Posted March 20, 2007 Posted March 20, 2007 I wrote a script to send info to a command line program. However, I noticed after I tested it a few times, I have several instances of cmd.exe open in the task manager. Is there a way to close out cmd.exe after the command completes successfully? I don't want to use a ProcessClose () with a Sleep, because there is no way to tell if the command is done running (one of the options could take up to 5 minutes to finish) If someone can help, please post a response. Thanks vrocco
PaulIA Posted March 20, 2007 Posted March 20, 2007 I wrote a script to send info to a command line program. However, I noticed after I tested it a few times, I have several instances of cmd.exe open in the task manager. Is there a way to close out cmd.exe after the command completes successfully? I don't want to use a ProcessClose () with a Sleep, because there is no way to tell if the command is done running (one of the options could take up to 5 minutes to finish) If someone can help, please post a response.ThanksvroccoWelcome to the forum. Are you using the Run() or RunWait() functions to run your functions? If not, can you post a small piece of code that shows the problem you are having? Auto3Lib: A library of over 1200 functions for AutoIt
jvanegmond Posted March 20, 2007 Posted March 20, 2007 The /c parameter indicates the window should close once it is completed. The /k parameter indicates staying open. cmd /c <command> cmd /k <command> Example: Run("cmd /c ping 127.0.0.1","",@SW_SHOW) Run("cmd /k ping 127.0.0.1","",@SW_SHOW) github.com/jvanegmond
vrocco Posted March 20, 2007 Author Posted March 20, 2007 Cool thanks! I will try it with the /c switch.
vrocco Posted March 20, 2007 Author Posted March 20, 2007 Worked like a charm.......thanks for not flaming a n00b
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