Execution of batch files from event table
Execution of batch files from event table
I'm using a method which involves executing multiple batch files from the event table. When these files are executed, the command prompt window briefly appears until the batch file finishes. I am concerned about accidentally closing this window or entering text accidentally if it pops up at the wrong time as well if interference with other tasks. I would like the batch files to be executed with the command prompt window minimized or hidden. I've tried using the windows "start /min xxx.bat" command line function by putting it into the parameter field for the "run program" event, but clarity fails to execute the file. I've also tried to execute a shortcut (.lnk) file with "run minimized" checked as an option, but with no luck. Is there a way to get Clarity to execute the programs minimized or hidden (at least in the case of .bat files). I've looked for ways to handle this using windows, but the "start /min" command line option was all I could find.
Scott Horn
- Daniel Mentlik
- DataApex Support
- Posts: 354
- Joined: Fri Mar 27, 2009 3:15 pm
Re: Execution of batch files from event table
Dear Scott,
there is a way around this, even if Clarity itself cannot run the program with the "start /min" parameter.
For this to work, you have to run not your desired program, but cmd instead. In the parameter field, use the "/C start /min yourprogram.bat parameters-of-your-program", for example
This will cause the cmd command to be called, the c/ parameter causes it to run the start.bat batch file and close itself immediately, and the start.bat file would be run minimized with a parameter of myfile.txt (if that's applicable for you). For more clarity, look at the attached screenshot:
Hope that helps.
Best Regards,
Daniel
there is a way around this, even if Clarity itself cannot run the program with the "start /min" parameter.
For this to work, you have to run not your desired program, but cmd instead. In the parameter field, use the "/C start /min yourprogram.bat parameters-of-your-program", for example
Code: Select all
/C start /min start.bat myfile.txt
Best Regards,
Daniel
Daniel Mentlík
DataApex
DataApex