Help: Batch file running unexpectedly slowly
Posted: 22 Sep 2008 21:55
Hi, I have a question about batch files.
I've got a program which returns pretty much instantaneously (and runs successfully) when I run it from a command prompt.
However, when I call this same program from within a batch file, it takes about two minutes to return, although it does appear to still run successfully.
Has anyone here ever come across a similar scenario, or have any idea why this might be happening? Would it be related to the fact that the program takes a number of arguments?
Just as an example, running the program from the command prompt, I'd have something like this:
c:\>testprog /arg1 /arg2
where obviously "/arg1" and "/arg2" are the arguments. This runs and returns immediately.
Now, if I put the line
testprog /arg1 /arg2
within a batch file (containing no other commands whatsoever) called "testbat.bat" and execute the following command from the command prompt:
c:\>testbat
it'll take the program a couple of minutes to return, and I have no idea why.
If anyone could help me, it would be greatly appreciated!
I've got a program which returns pretty much instantaneously (and runs successfully) when I run it from a command prompt.
However, when I call this same program from within a batch file, it takes about two minutes to return, although it does appear to still run successfully.
Has anyone here ever come across a similar scenario, or have any idea why this might be happening? Would it be related to the fact that the program takes a number of arguments?
Just as an example, running the program from the command prompt, I'd have something like this:
c:\>testprog /arg1 /arg2
where obviously "/arg1" and "/arg2" are the arguments. This runs and returns immediately.
Now, if I put the line
testprog /arg1 /arg2
within a batch file (containing no other commands whatsoever) called "testbat.bat" and execute the following command from the command prompt:
c:\>testbat
it'll take the program a couple of minutes to return, and I have no idea why.
If anyone could help me, it would be greatly appreciated!