# DOS Parameter to set Window Position



## Barnster

I have 6 DOS batch jobs that do many different tasks, these are set up to run as scheduled tasks and run from 6am to midnight every day, their in a constant loop. They all run on the same server.

What I would like to do is include a parameter within these DOS Batch jobs to indicate the exact window position for each batch job. Currently when they are launched at the scheduled time the windows appear in a cascading order (overlapping one another). I want to specify the position for each window so that it makes it easier for me to see exactly what each batch job is doing, without having to shuffle windows around on the screen.

If I open a command window I can set the default buffer size, window size and window position. But then these default settings are applied to all future windows. This is how I have currently set the buffer size and window size to what I need, but I cannot set the window position, for if I do set the window position then all 6 batch Jobs end up directly over one another.


----------



## Squashman

Couldn't you just right click your taskbar and tile the windows?


----------



## Squashman

Here is what I did. I created shortcuts to each of the batch files. Then set the Window Size and Position on each batch file shortcut. Then just run the shortcuts to the batch files. Here is what I got.


----------



## Barnster

Right clicking Task Bar and tiling windows is an option, however window positions are totally random and they are re-sized to fit screen area. I have another 3 servers running 5 DOS batch jobs on each. Ideally would like to be able to specify window order and position so some other items on desktop are still accessible also.

I do like the shortcut option and it did work when I tried it, but what I failed to mention is that the scripts are actually run as FireDaemon Services and not a windows scheduled task. FireDaemon ignores the shortcut, bumma.

Appreciate you suggestions, anymore?

There's got to be a DOS parameter as there is to define windows size, there must be one to define buffer size and window position, surely?


----------



## Squashman

I have never seen an app that runs as service and still have an interactive console screen. What happens when they are running and someone logs out of console or what happens when someone logs in. If nobody is logged in and it tries to display the cmd shells on the screen I would think it would kill the batch files from running.

Why can't you reconfigure the FireDaemon services to use the Shortcuts instead of the batch directly. In theory is shouldn't matter.


----------



## TheOutcaste

Not familiar with FireDaemon, and you may have already done this, but remember that the extension for shortcuts is not displayed by Windows. If you have a batch file named batch.cmd, when you create a shortcut, the shortcut is batch.cmd.LNK. Perhaps you just need to include the .lnk extension.

Otherwise, only way I know is to use the Start command to start each batch file. Assign each window a different title, then position and size them. When you OK the properties dialog, choose the *Save properties for future windows with same title* option.
Start the files like this:
*Start "Window 1" Batch1.cmd*
*Start "Window 2" Batch2.cmd* and so on.
The Command Prompt window will remain open when the batch file exits unless you use the exit command, so you may need to use this in your "Starting" files:
*Start "Window 1" /Wait Batch1.cmd
Exit*

I've tried using the Title command in a batch file, but that changes the Title _after_ the window opens, and the *Save properties for future windows with same title* option uses the original window title, before the Title command can change it.

HTH

Jerry


----------

