Sign in to follow this  
Followers 0
Ambient

Batch File Problem

3 posts in this topic

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.

Share this post


Link to post
Share on other sites



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. :unsure:

E.g. for pinging you could simply use ping() in a loop.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites

Thanks Hannes I'll check it out and if I had my way I'd rewrite the lot loL! All in good ole autoit!

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