DOS Batch Window Position

March 26, 2009 at 15:29:16
Specs: Windows XP
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.

See More: DOS Batch Window Position

Report •

March 26, 2009 at 22:39:19
There is no internal command to set window position that I know of but a workaround can be achieved using unique window titles.

The easiest way to set this up would be open up a command prompt and for each title type in:

start "title"

Where title is the unique title of the job and the quotes tell the start command that title should be the window title (if start doesn't know what to start it should open a cmd window). Now either click on the icon on the top left hand corner of the new window or hit <alt>+<space> and select properties and set the window position. When you close the properties dialogue select "save properties for future windows with the same title".

You could also work out the registry setting under HKEY_users\<what ever this is for the user>\console\<window title>, but that is up to you.

Now to get it to work you will need to change your scheduled tasks so that instead of simply invoking the script you invoke it with a title(as the title command within the script won't work). To invoke it with a title start can be used:

start "title" "script"

Report •
Related Solutions

Ask Question