Set (Many) Programs' Window Size/Position

All we need is an easy explanation of the problem, so here it is.

I’m looking for a solution similar to this, but for Windows 7 (64-bit), and not just for the terminal. This is also definitely not a duplicate of this question.

The Problem

Some programs remember their last position/size (e.g. Firefox, Notepad++), while others are unfortunately stubborn (e.g. Git). The stubborn ones require me to spend an extra minute (so long, right?) moving them back to their desired positions/sizes before I can start working.

Use Case

I’m a programmer, and I have a very specific preference for my development environment. I have two monitors, and have my IDE (varies by the task), Git terminal, Windows Explorer window, Firefox, etc. open all at once, in a specific layout that helps me work more efficiently.

Environment-Based Auto-Setup

Ideally, I could open all of these programs, and press a hotkey combination to throw all of the windows into their desired positions with the correct sizes. Or even more ideally, have a set of settings (scripts, hotkey combinations, etc.) that I could run in certain scenarios to open a set of specific programs depending on the task (may be asking too much), and set that specific layout.

Example: a C# development script that opens Visual Studio and many other programs, then sets their window locations appropriately. Another for Node.js development.

Tools For The Job?

I only have some vague ideas of the capabilities of certain tools. Maybe Windows Power Shell would be appropriate? I wouldn’t mind writing scripts for these tasks. Auto Hotkey also seems like it might work.

Does anyone have any experience with this kind functionality and have any recommendations as to how to go about something like this? The ability to run a script/hotkey to open a set of programs and set all sizes/positions automatically would be best, if possible.

Note: I tagged this as powershell and autohotkey just in case those tools very well apply to the task. If you feel this is tagged incorrectly, please feel free to remove/re-tag!

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

You could use the PowerShell UIAutomation module.

For example, to move Notepad to screen location (100, 100):

$w = Get-UIAWindow -ProcessName notepad
$w.Move(100, 100)

Method 2

You also could try TaskLayout tool (not a freeware) which offers user-friendly way to create such layouts without scripting/programming.

TaskLayout is a small portable Windows utility which allows to save/restore the desktop layout(a set of specified apps/windows with corresponding position on screen) in a single click.

The application can save different desktop layout files, run them and restore the windows that were active at that moment. The layout editor helps you to choose several of the opened windows and save the configuration in a file. Whenever you require restoring the window having the location or a specific path, just run the file. The application can restore the opened window to the state in which you stored them.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply