4

I'm having this issue when running a batch file with Tivoli Workload Scheduler.

There's a third party program, let's says its name is program.exe

The batch file contains the following command to invoke program.exe

program.exe param1 param2 param3

The problem is the batch file terminates when there are warning popups from program.exe; but we're totally ok with the warning popups. We want it to run regardless of how many warnings it encounters.

I've looked into this and found out that using 'start' could solve the problem.

'call' behaves the same way as direct invoking.

So when we directly invoke the program does it default to ?

call program.exe

or is there any significant difference between direct invoke and call ?

John DOE
  • 400
  • 1
  • 3
  • 16
HaseebR7
  • 447
  • 4
  • 11

2 Answers2

3

is there any significant difference between direct invoke and call ?

No difference: you would call to call another cmd batch script.
It also ensures you return to the current script once the call is done.

You can also use it to call an function within your current script.

VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
  • ok, great :) Now i'll just switch to using start to execute the program.exe which will keep running regardless of warning popups and use findstr to monitor progress of the program. – HaseebR7 Nov 23 '14 at 09:23
3

For the program it's not a difference, but you got different results for the parameters, as the parameters will be evaluated two times by the parser.

program Program^&Documents "One caret ^ "
call program.exe Program^&Documents "One caret ^ "

The first line works as expected, but the second results into

program.exe Program
&Documents "One caret ^^ "

And it fails completly because the & can't be avaluated in a CALL.
And carets are doubled by a call.

jeb
  • 74,839
  • 15
  • 166
  • 215