Ambient Posted April 28, 2011 Share Posted April 28, 2011 Hi Guys, I have been messing about with a little script that accepts a parameter which is the name of a batch file (any batch file in C:\batch) which the script will then run showing a progress bar until cmd.exe closes. I haven't quite finished it but I was using a batch file which pings google for testing and I noticed the when my script finishes cmd.exe gets closed but ping.exe remains open in processes. My problem is how can i determine what processs get opened by the batch file? I was thinking of perhaps getting all running processes at the start of the script into an array the when I run the batch file doing the same then compareing to get the differnces. When I have the differences closing them when the script finishes. Just my thoughts but there is probably an easier way to do this. The reasn I want to do this is we use quite a few batch files historically and it would be nice notto have to re-write then but run them hidden rather then have them showing CMd windows all over the place. Link to comment Share on other sites More sharing options...
hannes08 Posted April 28, 2011 Share Posted April 28, 2011 Hi Ambient,take a look at the entry from SmOke_N He has a code snippet to get the child processes.Anyway I'd suggest you to rewrite the batchs. E.g. for pinging you could simply use ping() in a loop. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
Ambient Posted April 28, 2011 Author Share Posted April 28, 2011 Thanks Hannes I'll check it out and if I had my way I'd rewrite the lot loL! All in good ole autoit! 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