Post Reply

Forums -> UltraMon™ -> Using Ultramon in batch files
Alex   2014-09-08 08:01
I have a need to run a program in a batch file, and continue processing the batch file after the program ends. It works fine when I run the program by itself, but if instead of running the program I run the Ultramon shortcut (so I can control the size and position of the program window), then Ultramon returns control to the batch file as soon as the program is started, and the batch file continues with the next line while the program is still running. Is there a way to wait for the program to exit before Ultramon returns control to the batch file that executed the shortcut?
Christian Studer   2014-09-08 15:15
That's not supported directly, what you could do is use a custom script instead which launches the application, moves it to the desired monitor, then waits until the application quits. You could then execute this script from your batch file.

If you're interested in this let me know what settings you want to use for the application's window (monitor, maximized or normal size, etc).

Christian Studer - www.realtimesoft.com
Alex   2014-09-09 05:13
I'm using normal settings, just placing the window in a specific position on the desktop(left:0, top:100). Thanks!
Christian Studer   2014-09-09 13:37
I have uploaded a script which does this: LaunchApp2

For your needs you would need to set EXE on the first line to the application you want to launch, then set POS to "0,100", SIZE to "" and WAIT_FOR_APP_EXIT to True. Let me know if you have any questions about configuring the script.

In the batch file you can just enter the name of the script, like this:

"C:\Temp\LaunchApp2.vbs"

Christian Studer - www.realtimesoft.com
Alex   2014-09-09 13:57
I'll try it, thanks!
Alex   2014-09-15 13:22
Worked great, thanks!
Forums -> UltraMon™ -> Using Ultramon in batch files

Post Reply